Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

DatabaseContextModelSnapshot.cs 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. // <auto-generated />
  2. using System;
  3. using Diligent.WebAPI.Data;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Metadata;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Diligent.WebAPI.Data.Migrations
  10. {
  11. [DbContext(typeof(DatabaseContext))]
  12. partial class DatabaseContextModelSnapshot : ModelSnapshot
  13. {
  14. protected override void BuildModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("ProductVersion", "6.0.3")
  19. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  20. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
  21. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsuranceCompany", b =>
  22. {
  23. b.Property<long>("Id")
  24. .ValueGeneratedOnAdd()
  25. .HasColumnType("bigint");
  26. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  27. b.Property<string>("City")
  28. .IsRequired()
  29. .HasColumnType("nvarchar(max)");
  30. b.Property<string>("Country")
  31. .IsRequired()
  32. .HasColumnType("nvarchar(max)");
  33. b.Property<DateTime>("CreatedAtUtc")
  34. .HasColumnType("datetime2");
  35. b.Property<DateTime?>("DeletedAtUtc")
  36. .HasColumnType("datetime2");
  37. b.Property<string>("Fax")
  38. .IsRequired()
  39. .HasColumnType("nvarchar(max)");
  40. b.Property<string>("LegalAddress")
  41. .IsRequired()
  42. .HasColumnType("nvarchar(max)");
  43. b.Property<string>("LegalEmail")
  44. .IsRequired()
  45. .HasColumnType("nvarchar(max)");
  46. b.Property<string>("Name")
  47. .IsRequired()
  48. .HasColumnType("nvarchar(max)");
  49. b.Property<string>("PhoneNumber")
  50. .IsRequired()
  51. .HasColumnType("nvarchar(max)");
  52. b.Property<string>("PostalCode")
  53. .IsRequired()
  54. .HasColumnType("nvarchar(max)");
  55. b.Property<DateTime?>("UpdatedAtUtc")
  56. .HasColumnType("datetime2");
  57. b.HasKey("Id");
  58. b.ToTable("InsuranceCompanies");
  59. });
  60. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  61. {
  62. b.Property<long>("Id")
  63. .ValueGeneratedOnAdd()
  64. .HasColumnType("bigint");
  65. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  66. b.Property<DateTime>("CreatedAtUtc")
  67. .HasColumnType("datetime2");
  68. b.Property<DateTime?>("DeletedAtUtc")
  69. .HasColumnType("datetime2");
  70. b.Property<DateTime>("EndDate")
  71. .HasColumnType("datetime2");
  72. b.Property<long>("InsurerId")
  73. .HasColumnType("bigint");
  74. b.Property<decimal>("Premium")
  75. .HasColumnType("decimal(18,2)");
  76. b.Property<DateTime>("StartDate")
  77. .HasColumnType("datetime2");
  78. b.Property<string>("Type")
  79. .IsRequired()
  80. .HasColumnType("nvarchar(max)");
  81. b.Property<DateTime?>("UpdatedAtUtc")
  82. .HasColumnType("datetime2");
  83. b.HasKey("Id");
  84. b.HasIndex("InsurerId");
  85. b.ToTable("InsurancePolicies");
  86. });
  87. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  88. {
  89. b.Property<long>("Id")
  90. .ValueGeneratedOnAdd()
  91. .HasColumnType("bigint");
  92. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  93. b.Property<string>("Address")
  94. .IsRequired()
  95. .HasColumnType("nvarchar(max)");
  96. b.Property<string>("City")
  97. .IsRequired()
  98. .HasColumnType("nvarchar(max)");
  99. b.Property<string>("Country")
  100. .IsRequired()
  101. .HasColumnType("nvarchar(max)");
  102. b.Property<DateTime>("CreatedAtUtc")
  103. .HasColumnType("datetime2");
  104. b.Property<DateTime>("DateOfBirth")
  105. .HasColumnType("datetime2");
  106. b.Property<DateTime?>("DeletedAtUtc")
  107. .HasColumnType("datetime2");
  108. b.Property<string>("Email")
  109. .IsRequired()
  110. .HasColumnType("nvarchar(max)");
  111. b.Property<string>("FirstName")
  112. .IsRequired()
  113. .HasColumnType("nvarchar(max)");
  114. b.Property<long>("InsuranceCompanyId")
  115. .HasColumnType("bigint");
  116. b.Property<string>("LastName")
  117. .IsRequired()
  118. .HasColumnType("nvarchar(max)");
  119. b.Property<string>("PhoneNumber")
  120. .IsRequired()
  121. .HasColumnType("nvarchar(max)");
  122. b.Property<string>("PostalCode")
  123. .IsRequired()
  124. .HasColumnType("nvarchar(max)");
  125. b.Property<DateTime?>("UpdatedAtUtc")
  126. .HasColumnType("datetime2");
  127. b.HasKey("Id");
  128. b.HasIndex("InsuranceCompanyId");
  129. b.ToTable("Insurers");
  130. });
  131. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.User", b =>
  132. {
  133. b.Property<long>("Id")
  134. .ValueGeneratedOnAdd()
  135. .HasColumnType("bigint");
  136. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  137. b.Property<DateTime>("CreatedAtUtc")
  138. .HasColumnType("datetime2");
  139. b.Property<DateTime?>("DeletedAtUtc")
  140. .HasColumnType("datetime2");
  141. b.Property<string>("FirstName")
  142. .IsRequired()
  143. .HasColumnType("nvarchar(max)");
  144. b.Property<string>("LastName")
  145. .IsRequired()
  146. .HasColumnType("nvarchar(max)");
  147. b.Property<string>("Password")
  148. .IsRequired()
  149. .HasColumnType("nvarchar(max)");
  150. b.Property<DateTime?>("UpdatedAtUtc")
  151. .HasColumnType("datetime2");
  152. b.Property<string>("Username")
  153. .IsRequired()
  154. .HasColumnType("nvarchar(max)");
  155. b.HasKey("Id");
  156. b.ToTable("User");
  157. });
  158. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookDefinition", b =>
  159. {
  160. b.Property<long>("Id")
  161. .ValueGeneratedOnAdd()
  162. .HasColumnType("bigint");
  163. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  164. b.Property<DateTime>("CreatedAtUtc")
  165. .HasColumnType("datetime2");
  166. b.Property<DateTime?>("DeletedAtUtc")
  167. .HasColumnType("datetime2");
  168. b.Property<string>("Description")
  169. .IsRequired()
  170. .HasColumnType("nvarchar(max)");
  171. b.Property<string>("DisplayName")
  172. .IsRequired()
  173. .HasMaxLength(100)
  174. .HasColumnType("nvarchar(100)");
  175. b.Property<string>("Name")
  176. .IsRequired()
  177. .HasMaxLength(100)
  178. .HasColumnType("nvarchar(100)");
  179. b.Property<DateTime?>("UpdatedAtUtc")
  180. .HasColumnType("datetime2");
  181. b.HasKey("Id");
  182. b.ToTable("WebhookDefinitions");
  183. });
  184. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  185. {
  186. b.Property<long>("Id")
  187. .ValueGeneratedOnAdd()
  188. .HasColumnType("bigint");
  189. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"), 1L, 1);
  190. b.Property<DateTime>("CreatedAtUtc")
  191. .HasColumnType("datetime2");
  192. b.Property<DateTime?>("DeletedAtUtc")
  193. .HasColumnType("datetime2");
  194. b.Property<bool>("IsActive")
  195. .HasColumnType("bit");
  196. b.Property<DateTime?>("UpdatedAtUtc")
  197. .HasColumnType("datetime2");
  198. b.Property<long>("WebhookDefinitionId")
  199. .HasColumnType("bigint");
  200. b.Property<string>("WebhookURL")
  201. .IsRequired()
  202. .HasColumnType("nvarchar(max)");
  203. b.HasKey("Id");
  204. b.HasIndex("WebhookDefinitionId");
  205. b.ToTable("WebhookSubscriptions");
  206. });
  207. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.InsurancePolicy", b =>
  208. {
  209. b.HasOne("Diligent.WebAPI.Data.Entities.Insurer", "Insurer")
  210. .WithMany()
  211. .HasForeignKey("InsurerId")
  212. .OnDelete(DeleteBehavior.Cascade)
  213. .IsRequired();
  214. b.Navigation("Insurer");
  215. });
  216. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.Insurer", b =>
  217. {
  218. b.HasOne("Diligent.WebAPI.Data.Entities.InsuranceCompany", "InsuranceCompany")
  219. .WithMany()
  220. .HasForeignKey("InsuranceCompanyId")
  221. .OnDelete(DeleteBehavior.Cascade)
  222. .IsRequired();
  223. b.Navigation("InsuranceCompany");
  224. });
  225. modelBuilder.Entity("Diligent.WebAPI.Data.Entities.WebhookSubscription", b =>
  226. {
  227. b.HasOne("Diligent.WebAPI.Data.Entities.WebhookDefinition", "WebhookDefinition")
  228. .WithMany()
  229. .HasForeignKey("WebhookDefinitionId")
  230. .OnDelete(DeleteBehavior.Cascade)
  231. .IsRequired();
  232. b.Navigation("WebhookDefinition");
  233. });
  234. #pragma warning restore 612, 618
  235. }
  236. }
  237. }