//
using DamageAssesment.Api.Locations.Db;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace DamageAssesment.Api.Locations.Migrations
{
[DbContext(typeof(LocationDbContext))]
[Migration("20230817214454_InitialLocation")]
partial class InitialLocation
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Location", b =>
{
b.Property("Id")
.HasMaxLength(4)
.HasColumnType("nvarchar(4)");
b.Property("MaintenanceCenter")
.IsRequired()
.HasMaxLength(1)
.HasColumnType("nvarchar(1)");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("RegionId")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("SchoolType")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("nvarchar(2)");
b.HasKey("Id");
b.ToTable("Locations");
});
modelBuilder.Entity("DamageAssesment.Api.Locations.Db.Region", b =>
{
b.Property("Id")
.HasMaxLength(2)
.HasColumnType("nvarchar(2)");
b.Property("Abbreviation")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("nvarchar(5)");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.ToTable("Regions");
});
#pragma warning restore 612, 618
}
}
}