Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

20221024095648_UserAdded.Designer.cs 12KB

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