//
using System;
using Data.SeaHavenIndustries;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Data.SeaHavenIndustries.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.HasSequence("WorkOrderInternalNumberSequence");
modelBuilder.Entity("Data.SeaHavenIndustries.Accounts", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("About")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("CurrencyCode")
.HasColumnType("nvarchar(max)");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("FacebookUrl")
.HasColumnType("nvarchar(max)");
b.Property("Importance")
.HasColumnType("int");
b.Property("IndustryId")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("LinkedInUrl")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("OwnerEmployeeId")
.HasColumnType("int");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("PrivacySetting")
.HasColumnType("nvarchar(max)");
b.Property("ServiceInstructions")
.HasColumnType("nvarchar(max)");
b.Property("Tags")
.HasColumnType("nvarchar(max)");
b.Property("TerritoryId")
.HasColumnType("int");
b.Property("TimeZone")
.HasColumnType("nvarchar(max)");
b.Property("TwitterUrl")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("nvarchar(max)");
b.Property("Website")
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Accounts");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Addresses", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AccountId")
.HasColumnType("int");
b.Property("Address1")
.HasColumnType("nvarchar(max)");
b.Property("Address2")
.HasColumnType("nvarchar(max)");
b.Property("AddressType")
.HasColumnType("nvarchar(max)");
b.Property("City")
.HasColumnType("nvarchar(max)");
b.Property("ContactId")
.HasColumnType("int");
b.Property("Country")
.HasColumnType("nvarchar(max)");
b.Property("County")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("State")
.HasColumnType("nvarchar(max)");
b.Property("Zip")
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("ContactId");
b.ToTable("Addresses");
});
modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("AccessFailedCount")
.HasColumnType("int");
b.Property("AccountId")
.HasColumnType("int");
b.Property("Color")
.HasColumnType("nvarchar(max)");
b.Property("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property("Contact")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeletedDate")
.HasColumnType("datetime2");
b.Property("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("EmailConfirmed")
.HasColumnType("bit");
b.Property("FirstName")
.HasColumnType("nvarchar(max)");
b.Property("Initials")
.HasColumnType("nvarchar(max)");
b.Property("IsAccountOwner")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastName")
.HasColumnType("nvarchar(max)");
b.Property("Locations")
.HasColumnType("nvarchar(max)");
b.Property("LockoutEnabled")
.HasColumnType("bit");
b.Property("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property("PendingRegistration")
.HasColumnType("bit");
b.Property("PendingRegistrationCreatedDate")
.HasColumnType("datetime2");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property("TwoFactorEnabled")
.HasColumnType("bit");
b.Property("Type")
.HasColumnType("int");
b.Property("UniqueName")
.HasColumnType("nvarchar(max)");
b.Property("UserImage")
.HasColumnType("nvarchar(max)");
b.Property("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("IsAccountOwner")
.IsUnique()
.HasDatabaseName("IX_AspNetUsers_IsAccountOwner")
.HasFilter("IsAccountOwner = 1");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("Data.SeaHavenIndustries.Area", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("IsActive")
.HasColumnType("bit");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("NormalizedName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique();
b.ToTable("Areas");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AccountId")
.HasColumnType("int");
b.Property("AssetCode")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("LocationId")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("LocationId");
b.ToTable("Assets");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Category", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Categories");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Comments", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CommentType")
.HasColumnType("nvarchar(max)");
b.Property("Commenter")
.HasColumnType("nvarchar(max)");
b.Property("Commenttext")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("DispatchId")
.HasColumnType("int");
b.Property("Documents")
.HasColumnType("nvarchar(max)");
b.Property("ExternalCommentId")
.HasColumnType("nvarchar(max)");
b.Property("ExternalSource")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("ExternalSourceEmailS3Key")
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.Property("ExternalUpdatedAt")
.HasColumnType("datetimeoffset");
b.Property("ExternalVersionHash")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("RecordType")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("nvarchar(450)");
b.Property("WorkerOrderId")
.HasColumnType("int");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DispatchId");
b.HasIndex("UserId");
b.HasIndex("WorkerOrderId");
b.ToTable("Comments");
});
modelBuilder.Entity("Data.SeaHavenIndustries.CompletionDocTemplate", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ServiceKey")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property("TemplateUrl")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("WorkOrderType")
.HasColumnType("int");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ServiceKey", "IsActive");
b.ToTable("CompletionDocTemplates");
});
modelBuilder.Entity("Data.SeaHavenIndustries.ContactDetails", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("About")
.HasColumnType("nvarchar(max)");
b.Property("ContactId")
.HasColumnType("int");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DateOfBirth")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("FacebookUrl")
.HasColumnType("nvarchar(max)");
b.Property("Gender")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("LinkedInUrl")
.HasColumnType("nvarchar(max)");
b.Property("PrivacySetting")
.HasColumnType("nvarchar(max)");
b.Property("Tags")
.HasColumnType("nvarchar(max)");
b.Property("Territory")
.HasColumnType("nvarchar(max)");
b.Property("TwitterUrl")
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.ToTable("ContactDetails");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AccountId")
.HasColumnType("int");
b.Property("Address1")
.HasColumnType("nvarchar(max)");
b.Property("Address2")
.HasColumnType("nvarchar(max)");
b.Property("City")
.HasColumnType("nvarchar(max)");
b.Property("ContactType")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("FacebookUrl")
.HasColumnType("nvarchar(max)");
b.Property("FirstName")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("LastName")
.HasColumnType("nvarchar(max)");
b.Property("LinkedInUrl")
.HasColumnType("nvarchar(max)");
b.Property("LocationId")
.HasColumnType("int");
b.Property("MiddleName")
.HasColumnType("nvarchar(max)");
b.Property("Owner")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property("SiteContactOrder")
.HasColumnType("int");
b.Property("State")
.HasColumnType("nvarchar(max)");
b.Property("Title")
.HasColumnType("nvarchar(max)");
b.Property("TwitterUrl")
.HasColumnType("nvarchar(max)");
b.Property("Zip")
.HasColumnType("nvarchar(max)");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("LocationId");
b.ToTable("Contacts");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Department", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.HasKey("Id");
b.ToTable("Departments");
});
modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("AcceptToken")
.HasColumnType("nvarchar(max)");
b.Property("AcknowledgedAt")
.HasColumnType("datetime2");
b.Property("CommercialStatusUpdatedAt")
.HasColumnType("datetime2");
b.Property("CompletedDate")
.HasColumnType("datetime2");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("DispatchNumber")
.HasColumnType("nvarchar(max)");
b.Property("DispatchedAt")
.HasColumnType("datetime2");
b.Property("EmailSent")
.HasColumnType("bit");
b.Property("EstimatedArrivalAt")
.HasColumnType("datetime2");
b.Property("EtaManualOverride")
.HasColumnType("bit");
b.Property("InvoiceNumber")
.HasColumnType("nvarchar(max)");
b.Property("InvoiceStatus")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("NTEAmount")
.HasColumnType("decimal(18,2)");
b.Property("PONumber")
.HasColumnType("nvarchar(max)");
b.Property("PaymentStatus")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ReplyToAddress")
.HasColumnType("nvarchar(max)");
b.Property("RowVersion")
.IsConcurrencyToken()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("rowversion");
b.Property("ScheduledDate")
.HasColumnType("datetime2");
b.Property("Status")
.HasColumnType("nvarchar(max)");
b.Property("TechPhone")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property("VendorId")
.HasColumnType("int");
b.Property("VendorNotes")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)");
b.Property("VerifiedAt")
.HasColumnType("datetime2");
b.Property("VerifiedBy")
.HasColumnType("nvarchar(max)");
b.Property("WorkOrderId")
.HasColumnType("int");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("VendorId");
b.HasIndex("WorkOrderId");
b.ToTable("Dispatches");
});
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchChecklistItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CompletedAt")
.HasColumnType("datetime2");
b.Property("CompletedBy")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("DispatchId")
.HasColumnType("int");
b.Property("IsCompleted")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("ItemText")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("SortOrder")
.HasColumnType("int");
b.Property("WorkOrderId")
.HasColumnType("int");
b.Property("createdby")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("DispatchId");
b.HasIndex("WorkOrderId");
b.ToTable("DispatchChecklistItems");
});
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchSignoff", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("DeleterUserId")
.HasColumnType("nvarchar(max)");
b.Property("DeletionTime")
.HasColumnType("datetime2");
b.Property("DispatchId")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("int");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Signature")
.HasColumnType("nvarchar(max)");
b.Property