mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
3638 lines
128 KiB
C#
3638 lines
128 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Data.SeaHavenIndustries;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace Data.SeaHavenIndustries.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20260724234953_SH133_WorkOrderWebhookIngestion")]
|
|
partial class SH133_WorkOrderWebhookIngestion
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Accounts", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("About")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("CurrencyCode")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FacebookUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("Importance")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("IndustryId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("LinkedInUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("OwnerEmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Phone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PrivacySetting")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ServiceInstructions")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Tags")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("TerritoryId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("TimeZone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TwitterUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Type")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Website")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Accounts");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Addresses", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("AccountId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Address1")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Address2")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AddressType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("ContactId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Country")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("County")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
b.HasIndex("ContactId");
|
|
|
|
b.ToTable("Addresses");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Color")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Contact")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("DeletedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Initials")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Locations")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int?>("Type")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("UniqueName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserImage")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
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.Assets", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("AccountId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("AssetCode")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.ToTable("Assets");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Category", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Categories");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Comments", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("CommentType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Commenter")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Commenttext")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Documents")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ExternalCommentId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("RecordType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<int?>("WorkerOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ServiceKey")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("TemplateUrl")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("WorkOrderType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ServiceKey", "IsActive");
|
|
|
|
b.ToTable("CompletionDocTemplates");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.ContactDetails", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("About")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("ContactId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("DateOfBirth")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("FacebookUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Gender")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("LinkedInUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PrivacySetting")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Tags")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Territory")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TwitterUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ContactId");
|
|
|
|
b.ToTable("ContactDetails");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("AccountId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Address1")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Address2")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ContactType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FacebookUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("LastName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("LinkedInUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("MiddleName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Owner")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TwitterUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.ToTable("Contacts");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Department", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Departments");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AcceptToken")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("AcknowledgedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("CommercialStatusUpdatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("CompletedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("DispatchNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DispatchedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool>("EmailSent")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("EstimatedArrivalAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool>("EtaManualOverride")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("InvoiceNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("InvoiceStatus")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<decimal?>("NTEAmount")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<string>("PONumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PaymentStatus")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ReplyToAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<byte[]>("RowVersion")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("rowversion");
|
|
|
|
b.Property<DateTime?>("ScheduledDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TechPhone")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("VendorNotes")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)");
|
|
|
|
b.Property<DateTime?>("VerifiedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("VerifiedBy")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VendorId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("Dispatches");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchChecklistItem", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("CompletedBy")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool>("IsCompleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("ItemText")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DispatchId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("DispatchChecklistItems");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchSignoff", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Signature")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignatureMethod")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("SignedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("SignoffType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DispatchId");
|
|
|
|
b.ToTable("DispatchSignoffs");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchUpliftRequest", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<decimal?>("CurrentNTE")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<DateTime?>("DecidedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DecidedByUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("DecisionNote")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("RequestedByVendorName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<decimal>("RequestedNTE")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<int>("RequiredTier")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("VendorReason")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DispatchId", "Status")
|
|
.IsUnique()
|
|
.HasFilter("[Status] = 'Pending'");
|
|
|
|
b.ToTable("DispatchUpliftRequests");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchWorkOrder", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DispatchId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("DispatchWorkOrders");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DropdownOption", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Category")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("ParentValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Value")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("DropdownOptions");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("About")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("CanChangeProviderNumber")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("ConfirmUserName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CreatedBy")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("DateOfBirth")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("DepartmentId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("EmployeeNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FacebookUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("Gender")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("HireDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int?>("JobTitleId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("LastLogin")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("LinkedInUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("MiddleName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("PermissionGroupId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("RegionId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("SMSAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TimeZone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TwitterUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Website")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DepartmentId");
|
|
|
|
b.HasIndex("JobTitleId");
|
|
|
|
b.HasIndex("RegionId");
|
|
|
|
b.ToTable("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeAddress", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CountryCode")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("CountyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("StateCode")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Street")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("StreetLineTwo")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeeId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("EmployeeAddresses");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeEmail", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<int?>("EmailTypeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsPrimary")
|
|
.HasColumnType("bit");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.ToTable("EmployeeEmails");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeePhone", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Extension")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsPrimary")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("Number")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("PhoneTypeId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.ToTable("EmployeePhones");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Events", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<bool>("AllDay")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("EndDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("EndTime")
|
|
.HasMaxLength(10)
|
|
.HasColumnType("nvarchar(10)");
|
|
|
|
b.Property<string>("EventColor")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Location")
|
|
.HasMaxLength(150)
|
|
.HasColumnType("nvarchar(150)");
|
|
|
|
b.Property<int?>("RecordID")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("RecordName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("RecordTargetType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("ReminderMinutes")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("StartDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("StartTime")
|
|
.HasMaxLength(10)
|
|
.HasColumnType("nvarchar(10)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Events");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.FollowUps", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("AccountId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Reason")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("ScheduleDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<TimeSpan>("ScheduleStartTime")
|
|
.HasColumnType("time");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("FollowUps");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.ForgetPasswordCode", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Code")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("ForgetPasswordCodes");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.JobTitle", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("JobTitles");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address1")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Address2")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Latitude")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Longitude")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Locations");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.PMSchedules", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("AssetId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Frequency")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("StartDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssetId");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.ToTable("PMSchedules");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("BillingAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("ContactId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("Date")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("PO")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ProjectName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("QuotId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ShippingAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SiteId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SiteName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TT")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("WorkorderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ContactId");
|
|
|
|
b.HasIndex("WorkorderId");
|
|
|
|
b.ToTable("Quotes");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.QuotesLineItems", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Descriptions")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<decimal?>("Lineitem")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<int?>("LineitemNumber")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("QuoteId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuoteId");
|
|
|
|
b.ToTable("QuotesLines");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Region", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Regions");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.SitePreferredVendor", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Trade")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("UpdatedBy")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VendorId");
|
|
|
|
b.HasIndex("LocationId", "VendorId")
|
|
.IsUnique()
|
|
.HasFilter("[Trade] IS NULL");
|
|
|
|
b.HasIndex("LocationId", "VendorId", "Trade")
|
|
.IsUnique()
|
|
.HasFilter("[Trade] IS NOT NULL");
|
|
|
|
b.ToTable("SitePreferredVendors");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplate", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("TaskListTemplates");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplateItem", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("ItemText")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("TaskListTemplateId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TaskListTemplateId");
|
|
|
|
b.ToTable("TaskListTemplateItems");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Template", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AfterPhotoAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AfterPhotoIssue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AssignTo")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Attachments")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("BeforPhotoAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("BeforPhotoIssue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("CategoryId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("ContactId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DueDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("PO")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Priority")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffSignature")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TT")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("WorkerOrderNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("WorkerOrderTitle")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignTo");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.HasIndex("ContactId");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.ToTable("Templates");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AvailabilityStatus")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("AvailabilityUpdatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("CompanyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("CompanyName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CompanyPhone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ContactName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("GoogleMapsUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Phone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PreferredContact")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TradeSpecialties")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
b.ToTable("Vendors");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorAccessToken", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime>("ExpiresAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime>("IssuedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("LastUsedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("RevokedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Token")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("nvarchar(64)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Token")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("VendorId");
|
|
|
|
b.ToTable("VendorAccessTokens");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorAuditLog", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Actor")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("FieldName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("NewValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("OldValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VendorId");
|
|
|
|
b.ToTable("VendorAuditLogs");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompany", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CompanyPhone")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("GoogleMapsUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("State")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Zip")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique();
|
|
|
|
b.ToTable("VendorCompanies");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompletionDocument", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ContentType")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("OriginalFileName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("RejectionReason")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("ReplacesDocumentId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ReviewStatus")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("ReviewedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("ScanStatus")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("ScannedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<long>("SizeBytes")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("StoredFileName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Version")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DispatchId");
|
|
|
|
b.HasIndex("VendorId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("VendorCompletionDocuments");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AfterPhotoAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AfterPhotoIssue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateOnly?>("AssignDate")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("AssignTo")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Attachments")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AvettaTask")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("BeforPhotoAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("BeforPhotoIssue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Building")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("CarriedOver")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CompletedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Customer")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DateReported")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("DocStatus")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("DueDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTimeOffset?>("ExternalLastOccurredAt")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("ExternalWorkOrderId")
|
|
.HasMaxLength(450)
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ExtraServices")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)");
|
|
|
|
b.Property<string>("FlagColor")
|
|
.HasMaxLength(7)
|
|
.HasColumnType("nvarchar(7)");
|
|
|
|
b.Property<string>("InternalWONumber")
|
|
.HasMaxLength(11)
|
|
.HasColumnType("nvarchar(11)");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("LegacyStatus")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("LifecycleStatus")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("LocationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("OperationalFlags")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateOnly?>("OriginalDate")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<DateOnly?>("OriginalWeek")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("PO")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PocName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("PocNotes")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)");
|
|
|
|
b.Property<string>("PocPhone")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<int?>("PrimaryDispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Priority")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Problem")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("RescheduleCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<byte[]>("RowVersion")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("rowversion");
|
|
|
|
b.Property<bool?>("ScheduleWeekOnly")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("ScheduledDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("ScheduledEnd")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("ScheduledStart")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Service")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)");
|
|
|
|
b.Property<string>("ServiceNotes")
|
|
.HasMaxLength(4000)
|
|
.HasColumnType("nvarchar(4000)");
|
|
|
|
b.Property<string>("Severity")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffAttachment")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SignOffSignature")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SiteCode")
|
|
.HasMaxLength(32)
|
|
.HasColumnType("nvarchar(32)");
|
|
|
|
b.Property<string>("Source")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SourceEmailS3Key")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SubTrade")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TT")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateOnly?>("TargetWeek")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("TechPhone")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<string>("Trade")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<decimal?>("VendorNTE")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
b.Property<string>("VendorNotes")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)");
|
|
|
|
b.Property<int?>("WorkOrderType")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("WorkerOrderNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("WorkerOrderTitle")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool?>("istemplate")
|
|
.HasColumnType("bit");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ExternalWorkOrderId")
|
|
.IsUnique()
|
|
.HasFilter("[ExternalWorkOrderId] IS NOT NULL AND [ExternalWorkOrderId] <> ''");
|
|
|
|
b.HasIndex("InternalWONumber")
|
|
.HasFilter("[istemplate] = 0");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
b.HasIndex("PrimaryDispatchId");
|
|
|
|
b.HasIndex("ScheduledDate");
|
|
|
|
b.HasIndex("SiteCode")
|
|
.HasFilter("[istemplate] = 0");
|
|
|
|
b.HasIndex("WorkOrderType");
|
|
|
|
b.HasIndex("AssignTo", "ScheduledDate");
|
|
|
|
b.HasIndex("LifecycleStatus", "ScheduledDate")
|
|
.HasFilter("[istemplate] = 0");
|
|
|
|
b.ToTable("workOrders");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAttachments", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Attachments")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("Category")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("WorkorderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("WorkorderId");
|
|
|
|
b.ToTable("workOrderAttachments");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAuditLog", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Action")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ActorType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CorrelationId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("DispatchId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("EventType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("FieldName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("NewValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("OldValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<int>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.HasIndex("WorkOrderId");
|
|
|
|
b.ToTable("WorkOrderAuditLogs");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderCategories", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("CategoryId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("WorkorderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CategoryId");
|
|
|
|
b.HasIndex("WorkorderId");
|
|
|
|
b.ToTable("workOrderCategories");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderContacts", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int?>("ContactId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int?>("WorkorderId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ContactId");
|
|
|
|
b.HasIndex("WorkorderId");
|
|
|
|
b.ToTable("WorkOrderContacts");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderFieldLock", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("FieldName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<DateTime>("LockedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("LockedByUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("WorkOrderId", "FieldName")
|
|
.IsUnique();
|
|
|
|
b.ToTable("WorkOrderFieldLocks");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWebhookDelivery", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("BodySha256")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("nvarchar(64)");
|
|
|
|
b.Property<string>("DeliveryId")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)");
|
|
|
|
b.Property<string>("EventType")
|
|
.IsRequired()
|
|
.HasMaxLength(64)
|
|
.HasColumnType("nvarchar(64)");
|
|
|
|
b.Property<DateTimeOffset>("OccurredAt")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<DateTimeOffset>("ProcessedAt")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DeliveryId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("WorkOrderWebhookDeliveries");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWeekRolledLedger", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("CorrelationId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("ProcessedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateOnly>("SourceWeekStart")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<int>("WorkOrderId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("WorkOrderId", "SourceWeekStart")
|
|
.IsUnique();
|
|
|
|
b.ToTable("WorkOrderWeekRolledLedgers");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex")
|
|
.HasFilter("[NormalizedName] IS NOT NULL");
|
|
|
|
b.ToTable("AspNetRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("RoleId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetRoleClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserLogins", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetUserRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("AspNetUserTokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Addresses", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Accounts", "Account")
|
|
.WithMany("Addresses")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Contacts", "Contact")
|
|
.WithMany()
|
|
.HasForeignKey("ContactId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Contact");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Accounts", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Location")
|
|
.WithMany()
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Location");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Comments", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany("Comments")
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "ApplicationUser")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("Comments")
|
|
.HasForeignKey("WorkerOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("ApplicationUser");
|
|
|
|
b.Navigation("Dispatch");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.ContactDetails", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Contacts", "Contact")
|
|
.WithMany()
|
|
.HasForeignKey("ContactId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Contact");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Accounts", "Account")
|
|
.WithMany("Contacts")
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Location")
|
|
.WithMany()
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Location");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany("Dispatches")
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("Dispatches")
|
|
.HasForeignKey("WorkOrderId");
|
|
|
|
b.Navigation("Vendor");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchChecklistItem", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany("ChecklistItems")
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Dispatch");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchSignoff", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany("Signoffs")
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Dispatch");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchUpliftRequest", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany()
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Dispatch");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.DispatchWorkOrder", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany("DispatchWorkOrders")
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Dispatch");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Department", "Department")
|
|
.WithMany("Employees")
|
|
.HasForeignKey("DepartmentId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.JobTitle", "JobTitle")
|
|
.WithMany("Employees")
|
|
.HasForeignKey("JobTitleId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Region", "Region")
|
|
.WithMany("Employees")
|
|
.HasForeignKey("RegionId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Department");
|
|
|
|
b.Navigation("JobTitle");
|
|
|
|
b.Navigation("Region");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeAddress", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Employee", "Employee")
|
|
.WithOne("Address")
|
|
.HasForeignKey("Data.SeaHavenIndustries.EmployeeAddress", "EmployeeId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Employee");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeeEmail", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Employee", "Employee")
|
|
.WithMany("Emails")
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Employee");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.EmployeePhone", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Employee", "Employee")
|
|
.WithMany("Phones")
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Employee");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.FollowUps", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Accounts", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Employee", "Employee")
|
|
.WithMany()
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Location")
|
|
.WithMany()
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Account");
|
|
|
|
b.Navigation("Employee");
|
|
|
|
b.Navigation("Location");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.PMSchedules", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Assets", "Asset")
|
|
.WithMany("PMSchedules")
|
|
.HasForeignKey("AssetId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Location")
|
|
.WithMany()
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Asset");
|
|
|
|
b.Navigation("Location");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Contacts", "Contacts")
|
|
.WithMany()
|
|
.HasForeignKey("ContactId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("Quotes")
|
|
.HasForeignKey("WorkorderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Contacts");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.QuotesLineItems", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Quotes", "Quotes")
|
|
.WithMany("LineItems")
|
|
.HasForeignKey("QuoteId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Quotes");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.SitePreferredVendor", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Location")
|
|
.WithMany()
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany("SitePreferences")
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Location");
|
|
|
|
b.Navigation("Vendor");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplateItem", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.TaskListTemplate", "Template")
|
|
.WithMany("Items")
|
|
.HasForeignKey("TaskListTemplateId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Template");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Template", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "AssignToUser")
|
|
.WithMany("Templates")
|
|
.HasForeignKey("AssignTo")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Category", "Category")
|
|
.WithMany("Templates")
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Contacts", "POC")
|
|
.WithMany()
|
|
.HasForeignKey("ContactId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Locations")
|
|
.WithMany("Templates")
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("AssignToUser");
|
|
|
|
b.Navigation("Category");
|
|
|
|
b.Navigation("Locations");
|
|
|
|
b.Navigation("POC");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.VendorCompany", "Company")
|
|
.WithMany("Vendors")
|
|
.HasForeignKey("CompanyId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Company");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorAccessToken", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany()
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Vendor");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorAuditLog", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany("AuditLogs")
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Vendor");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompletionDocument", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "Dispatch")
|
|
.WithMany("CompletionDocuments")
|
|
.HasForeignKey("DispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany()
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Dispatch");
|
|
|
|
b.Navigation("Vendor");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "AssignToUser")
|
|
.WithMany("WorkOrders")
|
|
.HasForeignKey("AssignTo")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Locations", "Locations")
|
|
.WithMany("workOrders")
|
|
.HasForeignKey("LocationId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.Dispatch", "PrimaryDispatch")
|
|
.WithMany()
|
|
.HasForeignKey("PrimaryDispatchId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("AssignToUser");
|
|
|
|
b.Navigation("Locations");
|
|
|
|
b.Navigation("PrimaryDispatch");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAttachments", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("workOrderAttachments")
|
|
.HasForeignKey("WorkorderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderAuditLog", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderCategories", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Category", "Category")
|
|
.WithMany("WorkOrderCategories")
|
|
.HasForeignKey("CategoryId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("WorkOrderCategories")
|
|
.HasForeignKey("WorkorderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Category");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderContacts", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Contacts", "POC")
|
|
.WithMany("WorkOrderContacts")
|
|
.HasForeignKey("ContactId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("WorkOrderContacts")
|
|
.HasForeignKey("WorkorderId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("POC");
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderFieldLock", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany("FieldLocks")
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrderWeekRolledLedger", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.WorkOrder", "WorkOrder")
|
|
.WithMany()
|
|
.HasForeignKey("WorkOrderId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("WorkOrder");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Accounts", b =>
|
|
{
|
|
b.Navigation("Addresses");
|
|
|
|
b.Navigation("Contacts");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.ApplicationUser", b =>
|
|
{
|
|
b.Navigation("Templates");
|
|
|
|
b.Navigation("WorkOrders");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Assets", b =>
|
|
{
|
|
b.Navigation("PMSchedules");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Category", b =>
|
|
{
|
|
b.Navigation("Templates");
|
|
|
|
b.Navigation("WorkOrderCategories");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Contacts", b =>
|
|
{
|
|
b.Navigation("WorkOrderContacts");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Department", b =>
|
|
{
|
|
b.Navigation("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Dispatch", b =>
|
|
{
|
|
b.Navigation("ChecklistItems");
|
|
|
|
b.Navigation("Comments");
|
|
|
|
b.Navigation("CompletionDocuments");
|
|
|
|
b.Navigation("DispatchWorkOrders");
|
|
|
|
b.Navigation("Signoffs");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Employee", b =>
|
|
{
|
|
b.Navigation("Address");
|
|
|
|
b.Navigation("Emails");
|
|
|
|
b.Navigation("Phones");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.JobTitle", b =>
|
|
{
|
|
b.Navigation("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Locations", b =>
|
|
{
|
|
b.Navigation("Templates");
|
|
|
|
b.Navigation("workOrders");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Quotes", b =>
|
|
{
|
|
b.Navigation("LineItems");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Region", b =>
|
|
{
|
|
b.Navigation("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.TaskListTemplate", b =>
|
|
{
|
|
b.Navigation("Items");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.Vendor", b =>
|
|
{
|
|
b.Navigation("AuditLogs");
|
|
|
|
b.Navigation("Dispatches");
|
|
|
|
b.Navigation("SitePreferences");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.VendorCompany", b =>
|
|
{
|
|
b.Navigation("Vendors");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b =>
|
|
{
|
|
b.Navigation("Comments");
|
|
|
|
b.Navigation("Dispatches");
|
|
|
|
b.Navigation("FieldLocks");
|
|
|
|
b.Navigation("Quotes");
|
|
|
|
b.Navigation("WorkOrderCategories");
|
|
|
|
b.Navigation("WorkOrderContacts");
|
|
|
|
b.Navigation("workOrderAttachments");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|