mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 04:53:11 +00:00
- VendorAccessToken model + unique-index migration; TokenLifetimeDays config - VendorPortalTokenService: CSPRNG token generation, rotation, revocation - VendorPortalController: public portal API guarded by X-Vendor-Token header; dispatches list/detail, accept, vendor status transitions, cancel request, checklist updates, signoffs (vendor + customer), comments with dispatcher attribution via AspNetUsers join - VendorController: portal-token admin endpoints (get / rotate / revoke) - WorkOrderController: dispatch email now uses vendor portal URL and HTML-encodes user fields; AddDispatchComment now stores CommentType='dispatcher' with the SHOC user's name so portal can attribute the author - DispatchPublicController: deprecated per-dispatch GET accept flow returns a static 'link no longer active' page (no state mutation)
2879 lines
101 KiB
C#
2879 lines
101 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("20260420151445_AddVendorAccessToken")]
|
|
partial class AddVendorAccessToken
|
|
{
|
|
/// <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>("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<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.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<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")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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?>("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<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>("ReplyToAddress")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("ScheduledDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Status")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("VendorId")
|
|
.HasColumnType("int");
|
|
|
|
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.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<DateTime?>("CreatedDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("DeleterUserId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("DeletionTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("EmailTypeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<bool?>("IsDeleted")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool?>("IsPrimary")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime?>("LastModificationTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("LastModifierUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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.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<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")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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<int?>("AccountId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Contact")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ContactEmail")
|
|
.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>("Latitude")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Longitude")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Phone")
|
|
.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>("ZipCode")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AccountId");
|
|
|
|
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<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")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("createdby")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Regions");
|
|
});
|
|
|
|
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>("City")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CompanyName")
|
|
.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<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>("Phone")
|
|
.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.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.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<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<string>("Building")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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<DateTime?>("DueDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("ExternalWorkOrderId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("InternalWONumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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>("Problem")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("ScheduledDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("ScheduledStart")
|
|
.HasColumnType("datetime2");
|
|
|
|
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")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
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<string>("Trade")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<decimal?>("VendorNTE")
|
|
.HasColumnType("decimal(18,2)");
|
|
|
|
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("AssignTo");
|
|
|
|
b.HasIndex("LocationId");
|
|
|
|
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<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<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<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<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("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")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
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.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.Locations", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Accounts", "Account")
|
|
.WithMany()
|
|
.HasForeignKey("AccountId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Account");
|
|
});
|
|
|
|
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.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.VendorAccessToken", b =>
|
|
{
|
|
b.HasOne("Data.SeaHavenIndustries.Vendor", "Vendor")
|
|
.WithMany()
|
|
.HasForeignKey("VendorId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Vendor");
|
|
});
|
|
|
|
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.Navigation("AssignToUser");
|
|
|
|
b.Navigation("Locations");
|
|
});
|
|
|
|
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("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("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("Dispatches");
|
|
});
|
|
|
|
modelBuilder.Entity("Data.SeaHavenIndustries.WorkOrder", b =>
|
|
{
|
|
b.Navigation("Comments");
|
|
|
|
b.Navigation("Dispatches");
|
|
|
|
b.Navigation("Quotes");
|
|
|
|
b.Navigation("WorkOrderCategories");
|
|
|
|
b.Navigation("WorkOrderContacts");
|
|
|
|
b.Navigation("workOrderAttachments");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|