| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- // <auto-generated />
- using System;
- using Diligent.WebAPI.Data;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Infrastructure;
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
- using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
- #nullable disable
-
- namespace Diligent.WebAPI.Data.Migrations
- {
- [DbContext(typeof(DatabaseContext))]
- [Migration("20220815162411_AddedWebhookTables")]
- partial class AddedWebhookTables
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
- #pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "6.0.3")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
- {
- b.Property<long>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
-
- b.Property<string>("City")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("Country")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<DateTime>("CreatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime?>("DeletedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<string>("Fax")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("LegalAddress")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("LegalEmail")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("PhoneNumber")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("PostalCode")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<DateTime?>("UpdatedAtUtc")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.ToTable("InsuranceCompanies");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
- {
- b.Property<long>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
-
- b.Property<DateTime>("CreatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime?>("DeletedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime>("EndDate")
- .HasColumnType("datetime2");
-
- b.Property<long>("InsurerId")
- .HasColumnType("bigint");
-
- b.Property<decimal>("Premium")
- .HasColumnType("decimal(18,2)");
-
- b.Property<DateTime>("StartDate")
- .HasColumnType("datetime2");
-
- b.Property<string>("Type")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<DateTime?>("UpdatedAtUtc")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.HasIndex("InsurerId");
-
- b.ToTable("InsurancePolicies");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
- {
- b.Property<long>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
-
- b.Property<string>("Address")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("City")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("Country")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<DateTime>("CreatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime>("DateOfBirth")
- .HasColumnType("datetime2");
-
- b.Property<DateTime?>("DeletedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<string>("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("FirstName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<long>("InsuranceCompanyId")
- .HasColumnType("bigint");
-
- b.Property<string>("LastName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("PhoneNumber")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("PostalCode")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<DateTime?>("UpdatedAtUtc")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.HasIndex("InsuranceCompanyId");
-
- b.ToTable("Insurers");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
- {
- b.Property<long>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
-
- b.Property<DateTime>("CreatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime?>("DeletedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<string>("Description")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property<string>("DisplayName")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property<string>("Name")
- .IsRequired()
- .HasMaxLength(100)
- .HasColumnType("nvarchar(100)");
-
- b.Property<DateTime?>("UpdatedAtUtc")
- .HasColumnType("datetime2");
-
- b.HasKey("Id");
-
- b.ToTable("WebhookDefinitions");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
- {
- b.Property<long>("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
-
- b.Property<DateTime>("CreatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<DateTime?>("DeletedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<bool>("IsActive")
- .HasColumnType("bit");
-
- b.Property<DateTime?>("UpdatedAtUtc")
- .HasColumnType("datetime2");
-
- b.Property<long>("WebhookDefinitionId")
- .HasColumnType("bigint");
-
- b.Property<string>("WebhookURL")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("WebhookDefinitionId");
-
- b.ToTable("WebhookSubscriptions");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
- {
- b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
- .WithMany()
- .HasForeignKey("InsurerId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Insurer");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
- {
- b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
- .WithMany()
- .HasForeignKey("InsuranceCompanyId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("InsuranceCompany");
- });
-
- modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
- {
- b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
- .WithMany()
- .HasForeignKey("WebhookDefinitionId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("WebhookDefinition");
- });
- #pragma warning restore 612, 618
- }
- }
- }
|