20240416232405_AddRolesData.Designer.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  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("20240416232405_AddRolesData")]
  14. partial class AddRolesData
  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. b.HasData(
  43. new
  44. {
  45. Id = "b9e3a61d-7719-4a28-9e72-3e01e486d6ad",
  46. Name = "Администратор",
  47. NormalizedName = "ADMIN"
  48. },
  49. new
  50. {
  51. Id = "5db04fea-d3fe-4560-b3d2-af89fc81f885",
  52. Name = "Заведующий корпусом",
  53. NormalizedName = "ZAVED"
  54. },
  55. new
  56. {
  57. Id = "3e6a19fe-742c-413a-914d-c3c77c5f7862",
  58. Name = "Представитель НМЦ",
  59. NormalizedName = "PREDSTAV"
  60. },
  61. new
  62. {
  63. Id = "c99b7c50-641e-4c83-a868-2020dd042634",
  64. Name = "Председатель МК",
  65. NormalizedName = "PREDSED"
  66. },
  67. new
  68. {
  69. Id = "15b46e43-900d-4b7b-87aa-a3fbf9d1baa6",
  70. Name = "Преподаватель",
  71. NormalizedName = "PREPOD"
  72. });
  73. });
  74. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  75. {
  76. b.Property<int>("Id")
  77. .ValueGeneratedOnAdd()
  78. .HasColumnType("integer");
  79. NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
  80. b.Property<string>("ClaimType")
  81. .HasColumnType("text");
  82. b.Property<string>("ClaimValue")
  83. .HasColumnType("text");
  84. b.Property<string>("RoleId")
  85. .IsRequired()
  86. .HasColumnType("text");
  87. b.HasKey("Id");
  88. b.HasIndex("RoleId");
  89. b.ToTable("AspNetRoleClaims", (string)null);
  90. });
  91. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  92. {
  93. b.Property<int>("Id")
  94. .ValueGeneratedOnAdd()
  95. .HasColumnType("integer");
  96. NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
  97. b.Property<string>("ClaimType")
  98. .HasColumnType("text");
  99. b.Property<string>("ClaimValue")
  100. .HasColumnType("text");
  101. b.Property<string>("UserId")
  102. .IsRequired()
  103. .HasColumnType("text");
  104. b.HasKey("Id");
  105. b.HasIndex("UserId");
  106. b.ToTable("AspNetUserClaims", (string)null);
  107. });
  108. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  109. {
  110. b.Property<string>("LoginProvider")
  111. .HasColumnType("text");
  112. b.Property<string>("ProviderKey")
  113. .HasColumnType("text");
  114. b.Property<string>("ProviderDisplayName")
  115. .HasColumnType("text");
  116. b.Property<string>("UserId")
  117. .IsRequired()
  118. .HasColumnType("text");
  119. b.HasKey("LoginProvider", "ProviderKey");
  120. b.HasIndex("UserId");
  121. b.ToTable("AspNetUserLogins", (string)null);
  122. });
  123. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  124. {
  125. b.Property<string>("UserId")
  126. .HasColumnType("text");
  127. b.Property<string>("RoleId")
  128. .HasColumnType("text");
  129. b.HasKey("UserId", "RoleId");
  130. b.HasIndex("RoleId");
  131. b.ToTable("AspNetUserRoles", (string)null);
  132. });
  133. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  134. {
  135. b.Property<string>("UserId")
  136. .HasColumnType("text");
  137. b.Property<string>("LoginProvider")
  138. .HasColumnType("text");
  139. b.Property<string>("Name")
  140. .HasColumnType("text");
  141. b.Property<string>("Value")
  142. .HasColumnType("text");
  143. b.HasKey("UserId", "LoginProvider", "Name");
  144. b.ToTable("AspNetUserTokens", (string)null);
  145. });
  146. modelBuilder.Entity("OnlineMetodist.API.Models.ApplicationUser", b =>
  147. {
  148. b.Property<string>("Id")
  149. .HasColumnType("text");
  150. b.Property<int>("AccessFailedCount")
  151. .HasColumnType("integer");
  152. b.Property<string>("ConcurrencyStamp")
  153. .IsConcurrencyToken()
  154. .HasColumnType("text");
  155. b.Property<string>("Email")
  156. .HasMaxLength(256)
  157. .HasColumnType("character varying(256)");
  158. b.Property<bool>("EmailConfirmed")
  159. .HasColumnType("boolean");
  160. b.Property<bool>("LockoutEnabled")
  161. .HasColumnType("boolean");
  162. b.Property<DateTimeOffset?>("LockoutEnd")
  163. .HasColumnType("timestamp with time zone");
  164. b.Property<string>("NormalizedEmail")
  165. .HasMaxLength(256)
  166. .HasColumnType("character varying(256)");
  167. b.Property<string>("NormalizedUserName")
  168. .HasMaxLength(256)
  169. .HasColumnType("character varying(256)");
  170. b.Property<string>("PasswordHash")
  171. .HasColumnType("text");
  172. b.Property<string>("PhoneNumber")
  173. .HasColumnType("text");
  174. b.Property<bool>("PhoneNumberConfirmed")
  175. .HasColumnType("boolean");
  176. b.Property<string>("SecurityStamp")
  177. .HasColumnType("text");
  178. b.Property<bool>("TwoFactorEnabled")
  179. .HasColumnType("boolean");
  180. b.Property<string>("UserName")
  181. .HasMaxLength(256)
  182. .HasColumnType("character varying(256)");
  183. b.HasKey("Id");
  184. b.HasIndex("NormalizedEmail")
  185. .HasDatabaseName("EmailIndex");
  186. b.HasIndex("NormalizedUserName")
  187. .IsUnique()
  188. .HasDatabaseName("UserNameIndex");
  189. b.ToTable("AspNetUsers", (string)null);
  190. });
  191. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  192. {
  193. b.Property<Guid>("Id")
  194. .ValueGeneratedOnAdd()
  195. .HasColumnType("uuid");
  196. b.Property<Guid?>("IdMC")
  197. .HasColumnType("uuid");
  198. b.Property<string>("Name")
  199. .IsRequired()
  200. .HasColumnType("text");
  201. b.Property<string>("Patronymic")
  202. .HasColumnType("text");
  203. b.Property<string>("Surname")
  204. .IsRequired()
  205. .HasColumnType("text");
  206. b.Property<string>("UserId")
  207. .IsRequired()
  208. .HasColumnType("text");
  209. b.HasKey("Id");
  210. b.HasIndex("IdMC");
  211. b.HasIndex("UserId")
  212. .IsUnique();
  213. b.ToTable("Employees");
  214. });
  215. modelBuilder.Entity("OnlineMetodist.Models.Activity", b =>
  216. {
  217. b.Property<Guid>("Id")
  218. .ValueGeneratedOnAdd()
  219. .HasColumnType("uuid");
  220. b.Property<DateOnly>("DateOfEvent")
  221. .HasColumnType("date");
  222. b.Property<Guid?>("EmployeeId")
  223. .HasColumnType("uuid");
  224. b.Property<DateOnly?>("EndDateOfEvent")
  225. .HasColumnType("date");
  226. b.Property<Guid>("FormOfWorkFKId")
  227. .HasColumnType("uuid");
  228. b.Property<Guid>("IdFormOfWork")
  229. .HasColumnType("uuid");
  230. b.Property<string>("Specifications")
  231. .IsRequired()
  232. .HasColumnType("text");
  233. b.HasKey("Id");
  234. b.HasIndex("EmployeeId");
  235. b.HasIndex("FormOfWorkFKId");
  236. b.ToTable("Events");
  237. });
  238. modelBuilder.Entity("OnlineMetodist.Models.FormOfWork", b =>
  239. {
  240. b.Property<Guid>("Id")
  241. .ValueGeneratedOnAdd()
  242. .HasColumnType("uuid");
  243. b.Property<string>("Name")
  244. .IsRequired()
  245. .HasColumnType("text");
  246. b.HasKey("Id");
  247. b.ToTable("FormsOfWorks");
  248. b.HasData(
  249. new
  250. {
  251. Id = new Guid("2ef2618d-4a30-4f18-9d27-258eefdf55af"),
  252. Name = "Проведение"
  253. },
  254. new
  255. {
  256. Id = new Guid("d278705a-287b-465c-9129-e3e7e85690eb"),
  257. Name = "Участие"
  258. },
  259. new
  260. {
  261. Id = new Guid("f27967b1-13a8-4bf5-b286-8569094fc3ba"),
  262. Name = "Публикация"
  263. },
  264. new
  265. {
  266. Id = new Guid("39384f27-75d7-4a52-8c6c-6442a9dbb3c3"),
  267. Name = "Стажировка"
  268. });
  269. });
  270. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  271. {
  272. b.Property<Guid>("Id")
  273. .ValueGeneratedOnAdd()
  274. .HasColumnType("uuid");
  275. b.Property<Guid?>("IdHead")
  276. .HasColumnType("uuid");
  277. b.Property<string>("Name")
  278. .IsRequired()
  279. .HasColumnType("text");
  280. b.HasKey("Id");
  281. b.HasIndex("IdHead")
  282. .IsUnique();
  283. b.ToTable("MethodicaCommissions");
  284. b.HasData(
  285. new
  286. {
  287. Id = new Guid("c9606bfb-8be6-45bd-8758-f4baf87ce6cb"),
  288. Name = "Математических и естественно - научных дисциплин"
  289. },
  290. new
  291. {
  292. Id = new Guid("5579d667-8e33-4e31-92be-0af1898604f2"),
  293. Name = "Гуманитарных дисциплин"
  294. },
  295. new
  296. {
  297. Id = new Guid("cedc1e44-cd5a-4e49-814c-9926b0030659"),
  298. Name = "Иностранного языка"
  299. },
  300. new
  301. {
  302. Id = new Guid("b59b9413-5813-474b-abfe-0de5dfdb5564"),
  303. Name = "Дисциплин физической культуры и БЖД"
  304. },
  305. new
  306. {
  307. Id = new Guid("d223366a-7a6b-485c-91b7-de734619f4c8"),
  308. Name = "Общественных и правовых дисциплин"
  309. },
  310. new
  311. {
  312. Id = new Guid("e1e858a7-8185-473a-8eee-644546322a46"),
  313. Name = "Информатика и вычислительная техника"
  314. },
  315. new
  316. {
  317. Id = new Guid("45c8cde9-92cb-4973-8312-5e62768bef9f"),
  318. Name = "Экономика и управление, логистика"
  319. },
  320. new
  321. {
  322. Id = new Guid("97ed3094-f321-4258-81ef-46337a0e86ed"),
  323. Name = "Специальностей Товароведение, Коммерция"
  324. },
  325. new
  326. {
  327. Id = new Guid("c93cf688-be01-499f-8885-48e17a9bea0f"),
  328. Name = "Специальностей Банковское дело, ДОУ"
  329. },
  330. new
  331. {
  332. Id = new Guid("7b32336b-6e2b-4548-b571-79511fcc70ab"),
  333. Name = "Инструментальных дисциплин"
  334. },
  335. new
  336. {
  337. Id = new Guid("48b40e88-6948-44f8-a46b-41963f156697"),
  338. Name = "Музыкальных дисциплин"
  339. },
  340. new
  341. {
  342. Id = new Guid("68722d0f-aa91-4ef9-a40f-80b69d6ef3d0"),
  343. Name = "Специальности Дошкольное образование"
  344. },
  345. new
  346. {
  347. Id = new Guid("8c5ad7ae-31ff-41d5-9352-11e5af466c46"),
  348. Name = "Специальности Преподавание в начальных классах"
  349. });
  350. });
  351. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  352. {
  353. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  354. .WithMany()
  355. .HasForeignKey("RoleId")
  356. .OnDelete(DeleteBehavior.Cascade)
  357. .IsRequired();
  358. });
  359. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  360. {
  361. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  362. .WithMany()
  363. .HasForeignKey("UserId")
  364. .OnDelete(DeleteBehavior.Cascade)
  365. .IsRequired();
  366. });
  367. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  368. {
  369. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  370. .WithMany()
  371. .HasForeignKey("UserId")
  372. .OnDelete(DeleteBehavior.Cascade)
  373. .IsRequired();
  374. });
  375. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  376. {
  377. b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
  378. .WithMany()
  379. .HasForeignKey("RoleId")
  380. .OnDelete(DeleteBehavior.Cascade)
  381. .IsRequired();
  382. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  383. .WithMany()
  384. .HasForeignKey("UserId")
  385. .OnDelete(DeleteBehavior.Cascade)
  386. .IsRequired();
  387. });
  388. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  389. {
  390. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", null)
  391. .WithMany()
  392. .HasForeignKey("UserId")
  393. .OnDelete(DeleteBehavior.Cascade)
  394. .IsRequired();
  395. });
  396. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  397. {
  398. b.HasOne("OnlineMetodist.Models.MethodicalCommission", "MethodicalCommission")
  399. .WithMany("Employees")
  400. .HasForeignKey("IdMC");
  401. b.HasOne("OnlineMetodist.API.Models.ApplicationUser", "User")
  402. .WithOne("Employee")
  403. .HasForeignKey("OnlineMetodist.Models.Employee", "UserId")
  404. .OnDelete(DeleteBehavior.Cascade)
  405. .IsRequired();
  406. b.Navigation("MethodicalCommission");
  407. b.Navigation("User");
  408. });
  409. modelBuilder.Entity("OnlineMetodist.Models.Activity", b =>
  410. {
  411. b.HasOne("OnlineMetodist.Models.Employee", null)
  412. .WithMany("Events")
  413. .HasForeignKey("EmployeeId");
  414. b.HasOne("OnlineMetodist.Models.FormOfWork", "FormOfWorkFK")
  415. .WithMany()
  416. .HasForeignKey("FormOfWorkFKId")
  417. .OnDelete(DeleteBehavior.Cascade)
  418. .IsRequired();
  419. b.Navigation("FormOfWorkFK");
  420. });
  421. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  422. {
  423. b.HasOne("OnlineMetodist.Models.Employee", "HeadMC")
  424. .WithOne("HeadMC")
  425. .HasForeignKey("OnlineMetodist.Models.MethodicalCommission", "IdHead");
  426. b.Navigation("HeadMC");
  427. });
  428. modelBuilder.Entity("OnlineMetodist.API.Models.ApplicationUser", b =>
  429. {
  430. b.Navigation("Employee")
  431. .IsRequired();
  432. });
  433. modelBuilder.Entity("OnlineMetodist.Models.Employee", b =>
  434. {
  435. b.Navigation("Events");
  436. b.Navigation("HeadMC");
  437. });
  438. modelBuilder.Entity("OnlineMetodist.Models.MethodicalCommission", b =>
  439. {
  440. b.Navigation("Employees");
  441. });
  442. #pragma warning restore 612, 618
  443. }
  444. }
  445. }