20240415231146_EmpMcRelate.Designer.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Migrations;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
  8. using OnlineMetodist.API.Data;
  9. #nullable disable
  10. namespace OnlineMetodist.API.Migrations
  11. {
  12. [DbContext(typeof(OnlineMetodistDbContext))]
  13. [Migration("20240415231146_EmpMcRelate")]
  14. partial class EmpMcRelate
  15. {
  16. /// <inheritdoc />
  17. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  18. {
  19. #pragma warning disable 612, 618
  20. modelBuilder
  21. .HasAnnotation("ProductVersion", "8.0.3")
  22. .HasAnnotation("Relational:MaxIdentifierLength", 63);
  23. NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
  24. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
  25. {
  26. b.Property<string>("Id")
  27. .HasColumnType("text");
  28. b.Property<string>("ConcurrencyStamp")
  29. .IsConcurrencyToken()
  30. .HasColumnType("text");
  31. b.Property<string>("Name")
  32. .HasMaxLength(256)
  33. .HasColumnType("character varying(256)");
  34. b.Property<string>("NormalizedName")
  35. .HasMaxLength(256)
  36. .HasColumnType("character varying(256)");
  37. b.HasKey("Id");
  38. b.HasIndex("NormalizedName")
  39. .IsUnique()
  40. .HasDatabaseName("RoleNameIndex");
  41. b.ToTable("AspNetRoles", (string)null);
  42. });
  43. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  44. {
  45. b.Property<int>("Id")
  46. .ValueGeneratedOnAdd()
  47. .HasColumnType("integer");
  48. NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
  49. b.Property<string>("ClaimType")
  50. .HasColumnType("text");
  51. b.Property<string>("ClaimValue")
  52. .HasColumnType("text");
  53. b.Property<string>("RoleId")
  54. .IsRequired()
  55. .HasColumnType("text");
  56. b.HasKey("Id");
  57. b.HasIndex("RoleId");
  58. b.ToTable("AspNetRoleClaims", (string)null);
  59. });
  60. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  61. {
  62. b.Property<int>("Id")
  63. .ValueGeneratedOnAdd()
  64. .HasColumnType("integer");
  65. NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
  66. b.Property<string>("ClaimType")
  67. .HasColumnType("text");
  68. b.Property<string>("ClaimValue")
  69. .HasColumnType("text");
  70. b.Property<string>("UserId")
  71. .IsRequired()
  72. .HasColumnType("text");
  73. b.HasKey("Id");
  74. b.HasIndex("UserId");
  75. b.ToTable("AspNetUserClaims", (string)null);
  76. });
  77. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  78. {
  79. b.Property<string>("LoginProvider")
  80. .HasColumnType("text");
  81. b.Property<string>("ProviderKey")
  82. .HasColumnType("text");
  83. b.Property<string>("ProviderDisplayName")
  84. .HasColumnType("text");
  85. b.Property<string>("UserId")
  86. .IsRequired()
  87. .HasColumnType("text");
  88. b.HasKey("LoginProvider", "ProviderKey");
  89. b.HasIndex("UserId");
  90. b.ToTable("AspNetUserLogins", (string)null);
  91. });
  92. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  93. {
  94. b.Property<string>("UserId")
  95. .HasColumnType("text");
  96. b.Property<string>("RoleId")
  97. .HasColumnType("text");
  98. b.HasKey("UserId", "RoleId");
  99. b.HasIndex("RoleId");
  100. b.ToTable("AspNetUserRoles", (string)null);
  101. });
  102. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  103. {
  104. b.Property<string>("UserId")
  105. .HasColumnType("text");
  106. b.Property<string>("LoginProvider")
  107. .HasColumnType("text");
  108. b.Property<string>("Name")
  109. .HasColumnType("text");
  110. b.Property<string>("Value")
  111. .HasColumnType("text");
  112. b.HasKey("UserId", "LoginProvider", "Name");
  113. b.ToTable("AspNetUserTokens", (string)null);
  114. });
  115. modelBuilder.Entity("OnlineMetodist.API.Models.ApplicationUser", b =>
  116. {
  117. b.Property<string>("Id")
  118. .HasColumnType("text");
  119. b.Property<int>("AccessFailedCount")
  120. .HasColumnType("integer");
  121. b.Property<string>("ConcurrencyStamp")
  122. .IsConcurrencyToken()
  123. .HasColumnType("text");
  124. b.Property<string>("Email")
  125. .HasMaxLength(256)
  126. .HasColumnType("character varying(256)");
  127. b.Property<bool>("EmailConfirmed")
  128. .HasColumnType("boolean");
  129. b.Property<bool>("LockoutEnabled")
  130. .HasColumnType("boolean");
  131. b.Property<DateTimeOffset?>("LockoutEnd")
  132. .HasColumnType("timestamp with time zone");
  133. b.Property<string>("NormalizedEmail")
  134. .HasMaxLength(256)
  135. .HasColumnType("character varying(256)");
  136. b.Property<string>("NormalizedUserName")
  137. .HasMaxLength(256)
  138. .HasColumnType("character varying(256)");
  139. b.Property<string>("PasswordHash")
  140. .HasColumnType("text");
  141. b.Property<string>("PhoneNumber")
  142. .HasColumnType("text");
  143. b.Property<bool>("PhoneNumberConfirmed")
  144. .HasColumnType("boolean");
  145. b.Property<string>("SecurityStamp")
  146. .HasColumnType("text");
  147. b.Property<bool>("TwoFactorEnabled")
  148. .HasColumnType("boolean");
  149. b.Property<string>("UserName")
  150. .HasMaxLength(256)
  151. .HasColumnType("character varying(256)");
  152. b.HasKey("Id");
  153. b.HasIndex("NormalizedEmail")
  154. .HasDatabaseName("EmailIndex");
  155. b.HasIndex("NormalizedUserName")
  156. .IsUnique()
  157. .HasDatabaseName("UserNameIndex");
  158. b.ToTable("AspNetUsers", (string)null);
  159. });
  160. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  161. {
  162. b.Property<Guid>("Id")
  163. .ValueGeneratedOnAdd()
  164. .HasColumnType("uuid");
  165. b.Property<Guid?>("IdMC")
  166. .HasColumnType("uuid");
  167. b.Property<string>("Name")
  168. .IsRequired()
  169. .HasColumnType("text");
  170. b.Property<string>("Patronymic")
  171. .HasColumnType("text");
  172. b.Property<string>("Surname")
  173. .IsRequired()
  174. .HasColumnType("text");
  175. b.Property<string>("UserId")
  176. .IsRequired()
  177. .HasColumnType("text");
  178. b.HasKey("Id");
  179. b.HasIndex("IdMC");
  180. b.HasIndex("UserId")
  181. .IsUnique();
  182. b.ToTable("Employees");
  183. });
  184. modelBuilder.Entity("OnlineMetodist.Models.Activity", b =>
  185. {
  186. b.Property<Guid>("Id")
  187. .ValueGeneratedOnAdd()
  188. .HasColumnType("uuid");
  189. b.Property<DateOnly>("DateOfEvent")
  190. .HasColumnType("date");
  191. b.Property<Guid?>("EmployeeId")
  192. .HasColumnType("uuid");
  193. b.Property<DateOnly?>("EndDateOfEvent")
  194. .HasColumnType("date");
  195. b.Property<Guid>("FormOfWorkFKId")
  196. .HasColumnType("uuid");
  197. b.Property<Guid>("IdFormOfWork")
  198. .HasColumnType("uuid");
  199. b.Property<string>("Specifications")
  200. .IsRequired()
  201. .HasColumnType("text");
  202. b.HasKey("Id");
  203. b.HasIndex("EmployeeId");
  204. b.HasIndex("FormOfWorkFKId");
  205. b.ToTable("Events");
  206. });
  207. modelBuilder.Entity("OnlineMetodist.Models.FormOfWork", b =>
  208. {
  209. b.Property<Guid>("Id")
  210. .ValueGeneratedOnAdd()
  211. .HasColumnType("uuid");
  212. b.Property<string>("Name")
  213. .IsRequired()
  214. .HasColumnType("text");
  215. b.HasKey("Id");
  216. b.ToTable("FormsOfWorks");
  217. b.HasData(
  218. new
  219. {
  220. Id = new Guid("ffe2f148-281c-4b94-9f47-8fda7ca4dfd7"),
  221. Name = "Проведение"
  222. },
  223. new
  224. {
  225. Id = new Guid("c42f911f-e640-4de2-b767-e449d0b1c7b4"),
  226. Name = "Участие"
  227. },
  228. new
  229. {
  230. Id = new Guid("f51dad6d-2857-4a7c-8aac-c81ce42c6cc0"),
  231. Name = "Публикация"
  232. },
  233. new
  234. {
  235. Id = new Guid("55d73ffe-84ca-419d-977e-5d1cbd245564"),
  236. Name = "Стажировка"
  237. });
  238. });
  239. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  240. {
  241. b.Property<Guid>("Id")
  242. .ValueGeneratedOnAdd()
  243. .HasColumnType("uuid");
  244. b.Property<Guid?>("IdHead")
  245. .HasColumnType("uuid");
  246. b.Property<string>("Name")
  247. .IsRequired()
  248. .HasColumnType("text");
  249. b.HasKey("Id");
  250. b.HasIndex("IdHead")
  251. .IsUnique();
  252. b.ToTable("MethodicaCommissions");
  253. b.HasData(
  254. new
  255. {
  256. Id = new Guid("2d5b8e3b-ccf2-4c98-ba1f-285ddbdf1951"),
  257. Name = "Математических и естественно - научных дисциплин"
  258. },
  259. new
  260. {
  261. Id = new Guid("2768b0dc-e47e-4dca-bfb0-9ff1942285b6"),
  262. Name = "Гуманитарных дисциплин"
  263. },
  264. new
  265. {
  266. Id = new Guid("435529d6-1697-48f0-8c42-eea951e43885"),
  267. Name = "Иностранного языка"
  268. },
  269. new
  270. {
  271. Id = new Guid("45a83b6a-204f-4f04-aa53-564087628fa6"),
  272. Name = "Дисциплин физической культуры и БЖД"
  273. },
  274. new
  275. {
  276. Id = new Guid("3327d37c-d778-4274-8424-1cd0368ef90f"),
  277. Name = "Общественных и правовых дисциплин"
  278. },
  279. new
  280. {
  281. Id = new Guid("2a6638f3-d2e9-42f5-b574-2bb19736371d"),
  282. Name = "Информатика и вычислительная техника"
  283. },
  284. new
  285. {
  286. Id = new Guid("a5cfe9d3-f0aa-47a0-9479-19d1c825f02d"),
  287. Name = "Экономика и управление, логистика"
  288. },
  289. new
  290. {
  291. Id = new Guid("82cd544e-147a-40d9-9315-0fd4805a8df8"),
  292. Name = "Специальностей Товароведение, Коммерция"
  293. },
  294. new
  295. {
  296. Id = new Guid("799ec662-0b17-4e3b-8e04-049e86409796"),
  297. Name = "Специальностей Банковское дело, ДОУ"
  298. },
  299. new
  300. {
  301. Id = new Guid("4e36d6e5-42d4-47a3-9f49-b95e1e3706d8"),
  302. Name = "Инструментальных дисциплин"
  303. },
  304. new
  305. {
  306. Id = new Guid("1ab41ad7-edfc-4ee1-8ea0-d35001cb11f7"),
  307. Name = "Музыкальных дисциплин"
  308. },
  309. new
  310. {
  311. Id = new Guid("e870cc44-18c3-4be4-81ea-ac35145ce8f1"),
  312. Name = "Специальности Дошкольное образование"
  313. },
  314. new
  315. {
  316. Id = new Guid("a3d181b0-9bd2-4606-bd36-569416799dd7"),
  317. Name = "Специальности Преподавание в начальных классах"
  318. });
  319. });
  320. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  321. {
  322. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  323. .WithMany()
  324. .HasForeignKey("RoleId")
  325. .OnDelete(DeleteBehavior.Cascade)
  326. .IsRequired();
  327. });
  328. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  329. {
  330. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  331. .WithMany()
  332. .HasForeignKey("UserId")
  333. .OnDelete(DeleteBehavior.Cascade)
  334. .IsRequired();
  335. });
  336. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  337. {
  338. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  339. .WithMany()
  340. .HasForeignKey("UserId")
  341. .OnDelete(DeleteBehavior.Cascade)
  342. .IsRequired();
  343. });
  344. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  345. {
  346. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  347. .WithMany()
  348. .HasForeignKey("RoleId")
  349. .OnDelete(DeleteBehavior.Cascade)
  350. .IsRequired();
  351. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  352. .WithMany()
  353. .HasForeignKey("UserId")
  354. .OnDelete(DeleteBehavior.Cascade)
  355. .IsRequired();
  356. });
  357. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  358. {
  359. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  360. .WithMany()
  361. .HasForeignKey("UserId")
  362. .OnDelete(DeleteBehavior.Cascade)
  363. .IsRequired();
  364. });
  365. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  366. {
  367. b.HasOne("OnlineMetodist.Models.MethodicalCommission", "MethodicalCommission")
  368. .WithMany("Employees")
  369. .HasForeignKey("IdMC");
  370. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", "User")
  371. .WithOne("Employee")
  372. .HasForeignKey("OnlineMetodist.Models.Employee", "UserId")
  373. .OnDelete(DeleteBehavior.Cascade)
  374. .IsRequired();
  375. b.Navigation("MethodicalCommission");
  376. b.Navigation("User");
  377. });
  378. modelBuilder.Entity("OnlineMetodist.Models.Activity", b =>
  379. {
  380. b.HasOne("OnlineMetodist.Models.Employee", null)
  381. .WithMany("Events")
  382. .HasForeignKey("EmployeeId");
  383. b.HasOne("OnlineMetodist.Models.FormOfWork", "FormOfWorkFK")
  384. .WithMany()
  385. .HasForeignKey("FormOfWorkFKId")
  386. .OnDelete(DeleteBehavior.Cascade)
  387. .IsRequired();
  388. b.Navigation("FormOfWorkFK");
  389. });
  390. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  391. {
  392. b.HasOne("OnlineMetodist.Models.Employee", "HeadMC")
  393. .WithOne("HeadMC")
  394. .HasForeignKey("OnlineMetodist.Models.MethodicalCommission", "IdHead");
  395. b.Navigation("HeadMC");
  396. });
  397. modelBuilder.Entity("OnlineMetodist.API.Models.ApplicationUser", b =>
  398. {
  399. b.Navigation("Employee")
  400. .IsRequired();
  401. });
  402. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  403. {
  404. b.Navigation("Events");
  405. b.Navigation("HeadMC");
  406. });
  407. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  408. {
  409. b.Navigation("Employees");
  410. });
  411. #pragma warning restore 612, 618
  412. }
  413. }
  414. }