//
using System;
using DamageAssesment.Api.Documents.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.Documents.Migrations
{
[DbContext(typeof(DocumentDbContext))]
[Migration("20230828165655_InitialDocumentCreate")]
partial class InitialDocumentCreate
{
///
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.Documents.Db.Document", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("IsActive")
.HasColumnType("bit");
b.Property("Path")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("dateCreated")
.HasColumnType("datetime2");
b.Property("dateUpdated")
.HasColumnType("datetime2");
b.Property("description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("docName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("linkTypeId")
.HasColumnType("int");
b.Property("title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("url")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Documents");
});
modelBuilder.Entity("DamageAssesment.Api.Documents.Db.LinkType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("IsActive")
.HasColumnType("bit");
b.Property("TypeText")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("LinkTypes");
});
#pragma warning restore 612, 618
}
}
}