20240124091904_altrIdentity2.Designer.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. // <auto-generated />
  2. using System;
  3. using MTWorkHR.Identity.DBContext;
  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 MTWorkHR.Identity.Migrations
  11. {
  12. [DbContext(typeof(HRIdentityDBContext))]
  13. [Migration("20240124091904_altrIdentity2")]
  14. partial class altrIdentity2
  15. {
  16. /// <inheritdoc />
  17. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  18. {
  19. #pragma warning disable 612, 618
  20. modelBuilder
  21. .HasAnnotation("ProductVersion", "8.0.1")
  22. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  23. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
  24. modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
  25. {
  26. b.Property<string>("UserRolesId")
  27. .HasColumnType("nvarchar(450)");
  28. b.Property<string>("UsersId")
  29. .HasColumnType("nvarchar(450)");
  30. b.HasKey("UserRolesId", "UsersId");
  31. b.HasIndex("UsersId");
  32. b.ToTable("ApplicationRoleApplicationUser");
  33. });
  34. modelBuilder.Entity("MTWorkHR.Identity.Models.ApplicationRole", b =>
  35. {
  36. b.Property<string>("Id")
  37. .HasColumnType("nvarchar(450)");
  38. b.Property<string>("ConcurrencyStamp")
  39. .IsConcurrencyToken()
  40. .HasColumnType("nvarchar(max)");
  41. b.Property<DateTime>("CreateDate")
  42. .HasColumnType("datetime2");
  43. b.Property<string>("CreateUser")
  44. .HasColumnType("nvarchar(max)");
  45. b.Property<string>("DeleteUserId")
  46. .HasColumnType("nvarchar(max)");
  47. b.Property<bool?>("IsAdmin")
  48. .HasColumnType("bit");
  49. b.Property<bool>("IsDeleted")
  50. .HasColumnType("bit");
  51. b.Property<string>("Name")
  52. .HasMaxLength(256)
  53. .HasColumnType("nvarchar(256)");
  54. b.Property<string>("NormalizedName")
  55. .HasMaxLength(256)
  56. .HasColumnType("nvarchar(256)");
  57. b.Property<DateTime?>("UpdateDate")
  58. .HasColumnType("datetime2");
  59. b.Property<string>("UpdateUser")
  60. .HasColumnType("nvarchar(max)");
  61. b.HasKey("Id");
  62. b.HasIndex("NormalizedName")
  63. .IsUnique()
  64. .HasDatabaseName("RoleNameIndex")
  65. .HasFilter("[NormalizedName] IS NOT NULL");
  66. b.ToTable("AspNetRoles", (string)null);
  67. });
  68. modelBuilder.Entity("MTWorkHR.Identity.Models.ApplicationUser", b =>
  69. {
  70. b.Property<string>("Id")
  71. .HasColumnType("nvarchar(450)");
  72. b.Property<int>("AccessFailedCount")
  73. .HasColumnType("int");
  74. b.Property<string>("ConcurrencyStamp")
  75. .IsConcurrencyToken()
  76. .HasColumnType("nvarchar(max)");
  77. b.Property<string>("CreateUser")
  78. .HasColumnType("nvarchar(max)");
  79. b.Property<string>("DeleteUserId")
  80. .HasColumnType("nvarchar(max)");
  81. b.Property<string>("Email")
  82. .HasMaxLength(256)
  83. .HasColumnType("nvarchar(256)");
  84. b.Property<bool>("EmailConfirmed")
  85. .HasColumnType("bit");
  86. b.Property<string>("FirstName")
  87. .IsRequired()
  88. .HasColumnType("nvarchar(max)");
  89. b.Property<bool>("IsDeleted")
  90. .HasColumnType("bit");
  91. b.Property<bool>("IsStopped")
  92. .HasColumnType("bit");
  93. b.Property<string>("LastName")
  94. .IsRequired()
  95. .HasColumnType("nvarchar(max)");
  96. b.Property<bool>("LockoutEnabled")
  97. .HasColumnType("bit");
  98. b.Property<DateTimeOffset?>("LockoutEnd")
  99. .HasColumnType("datetimeoffset");
  100. b.Property<string>("ManagerId")
  101. .HasColumnType("nvarchar(450)");
  102. b.Property<string>("NormalizedEmail")
  103. .HasMaxLength(256)
  104. .HasColumnType("nvarchar(256)");
  105. b.Property<string>("NormalizedUserName")
  106. .HasMaxLength(256)
  107. .HasColumnType("nvarchar(256)");
  108. b.Property<string>("PasswordHash")
  109. .HasColumnType("nvarchar(max)");
  110. b.Property<string>("PhoneNumber")
  111. .HasColumnType("nvarchar(max)");
  112. b.Property<bool>("PhoneNumberConfirmed")
  113. .HasColumnType("bit");
  114. b.Property<string>("SecurityStamp")
  115. .HasColumnType("nvarchar(max)");
  116. b.Property<bool>("TwoFactorEnabled")
  117. .HasColumnType("bit");
  118. b.Property<string>("UpdateUser")
  119. .HasColumnType("nvarchar(max)");
  120. b.Property<string>("UserName")
  121. .HasMaxLength(256)
  122. .HasColumnType("nvarchar(256)");
  123. b.Property<int>("UserType")
  124. .HasColumnType("int");
  125. b.HasKey("Id");
  126. b.HasIndex("ManagerId");
  127. b.HasIndex("NormalizedEmail")
  128. .HasDatabaseName("EmailIndex");
  129. b.HasIndex("NormalizedUserName")
  130. .IsUnique()
  131. .HasDatabaseName("UserNameIndex")
  132. .HasFilter("[NormalizedUserName] IS NOT NULL");
  133. b.ToTable("AspNetUsers", (string)null);
  134. b.HasData(
  135. new
  136. {
  137. Id = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  138. AccessFailedCount = 0,
  139. ConcurrencyStamp = "9db21270-bc4c-40e0-8db7-21c2a932d26d",
  140. Email = "a@b.com",
  141. EmailConfirmed = true,
  142. FirstName = "Zinab",
  143. IsDeleted = false,
  144. IsStopped = false,
  145. LastName = "Elgendy",
  146. LockoutEnabled = false,
  147. NormalizedEmail = "A@B.COM",
  148. NormalizedUserName = "ADMIN",
  149. PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
  150. PhoneNumber = "1234567890",
  151. PhoneNumberConfirmed = true,
  152. SecurityStamp = "3e4eb597-09f6-44fb-8bb1-7027cd4a0eda",
  153. TwoFactorEnabled = false,
  154. UserName = "Admin",
  155. UserType = 1
  156. },
  157. new
  158. {
  159. Id = "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  160. AccessFailedCount = 0,
  161. ConcurrencyStamp = "32f0f04a-dbd7-4a86-9b4b-63dcf2ad75f7",
  162. Email = "ali@b.com",
  163. EmailConfirmed = true,
  164. FirstName = "Ali",
  165. IsDeleted = false,
  166. IsStopped = false,
  167. LastName = "Farok",
  168. LockoutEnabled = false,
  169. NormalizedEmail = "ALI@B.COM",
  170. NormalizedUserName = "ALI",
  171. PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
  172. PhoneNumber = "1234567890",
  173. PhoneNumberConfirmed = true,
  174. SecurityStamp = "7424f406-f7db-4698-bdb3-c7e28214619c",
  175. TwoFactorEnabled = false,
  176. UserName = "ali",
  177. UserType = 1
  178. });
  179. });
  180. modelBuilder.Entity("MTWorkHR.Identity.Models.Permission", b =>
  181. {
  182. b.Property<long>("Id")
  183. .ValueGeneratedOnAdd()
  184. .HasColumnType("bigint")
  185. .HasColumnOrder(0);
  186. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  187. b.Property<string>("CategoryName")
  188. .IsRequired()
  189. .HasMaxLength(150)
  190. .HasColumnType("nvarchar(150)");
  191. b.Property<string>("Desc")
  192. .IsRequired()
  193. .HasMaxLength(250)
  194. .HasColumnType("nvarchar(250)");
  195. b.Property<string>("Name")
  196. .IsRequired()
  197. .HasMaxLength(250)
  198. .HasColumnType("nvarchar(250)");
  199. b.Property<bool>("Show")
  200. .HasColumnType("bit");
  201. b.HasKey("Id");
  202. b.ToTable("Permissions");
  203. });
  204. modelBuilder.Entity("MTWorkHR.Identity.Models.RolePermission", b =>
  205. {
  206. b.Property<long>("Id")
  207. .ValueGeneratedOnAdd()
  208. .HasColumnType("bigint")
  209. .HasColumnOrder(0);
  210. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  211. b.Property<long>("PermissionId")
  212. .HasColumnType("bigint");
  213. b.Property<string>("PermissionName")
  214. .IsRequired()
  215. .HasColumnType("nvarchar(max)");
  216. b.Property<string>("RoleId")
  217. .IsRequired()
  218. .HasColumnType("nvarchar(450)");
  219. b.HasKey("Id");
  220. b.HasIndex("PermissionId");
  221. b.HasIndex("RoleId");
  222. b.ToTable("RolePermissions");
  223. });
  224. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
  225. {
  226. b.Property<string>("Id")
  227. .HasColumnType("nvarchar(450)");
  228. b.Property<string>("ConcurrencyStamp")
  229. .HasColumnType("nvarchar(max)");
  230. b.Property<string>("Name")
  231. .HasColumnType("nvarchar(max)");
  232. b.Property<string>("NormalizedName")
  233. .HasColumnType("nvarchar(max)");
  234. b.HasKey("Id");
  235. b.ToTable("IdentityRole");
  236. b.HasData(
  237. new
  238. {
  239. Id = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211B",
  240. Name = "Admin",
  241. NormalizedName = "ADMIN"
  242. },
  243. new
  244. {
  245. Id = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211A",
  246. Name = "Employee",
  247. NormalizedName = "EMPLOYEE"
  248. });
  249. });
  250. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  251. {
  252. b.Property<int>("Id")
  253. .ValueGeneratedOnAdd()
  254. .HasColumnType("int");
  255. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  256. b.Property<string>("ClaimType")
  257. .HasColumnType("nvarchar(max)");
  258. b.Property<string>("ClaimValue")
  259. .HasColumnType("nvarchar(max)");
  260. b.Property<string>("RoleId")
  261. .IsRequired()
  262. .HasColumnType("nvarchar(450)");
  263. b.HasKey("Id");
  264. b.HasIndex("RoleId");
  265. b.ToTable("AspNetRoleClaims", (string)null);
  266. });
  267. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  268. {
  269. b.Property<int>("Id")
  270. .ValueGeneratedOnAdd()
  271. .HasColumnType("int");
  272. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  273. b.Property<string>("ClaimType")
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<string>("ClaimValue")
  276. .HasColumnType("nvarchar(max)");
  277. b.Property<string>("UserId")
  278. .IsRequired()
  279. .HasColumnType("nvarchar(450)");
  280. b.HasKey("Id");
  281. b.HasIndex("UserId");
  282. b.ToTable("AspNetUserClaims", (string)null);
  283. });
  284. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  285. {
  286. b.Property<string>("LoginProvider")
  287. .HasColumnType("nvarchar(450)");
  288. b.Property<string>("ProviderKey")
  289. .HasColumnType("nvarchar(450)");
  290. b.Property<string>("ProviderDisplayName")
  291. .HasColumnType("nvarchar(max)");
  292. b.Property<string>("UserId")
  293. .IsRequired()
  294. .HasColumnType("nvarchar(450)");
  295. b.HasKey("LoginProvider", "ProviderKey");
  296. b.HasIndex("UserId");
  297. b.ToTable("AspNetUserLogins", (string)null);
  298. });
  299. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  300. {
  301. b.Property<string>("UserId")
  302. .HasColumnType("nvarchar(450)");
  303. b.Property<string>("RoleId")
  304. .HasColumnType("nvarchar(450)");
  305. b.HasKey("UserId", "RoleId");
  306. b.HasIndex("RoleId");
  307. b.ToTable("AspNetUserRoles", (string)null);
  308. b.HasData(
  309. new
  310. {
  311. UserId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  312. RoleId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211B"
  313. },
  314. new
  315. {
  316. UserId = "LL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  317. RoleId = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211A"
  318. });
  319. });
  320. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  321. {
  322. b.Property<string>("UserId")
  323. .HasColumnType("nvarchar(450)");
  324. b.Property<string>("LoginProvider")
  325. .HasColumnType("nvarchar(450)");
  326. b.Property<string>("Name")
  327. .HasColumnType("nvarchar(450)");
  328. b.Property<string>("Value")
  329. .HasColumnType("nvarchar(max)");
  330. b.HasKey("UserId", "LoginProvider", "Name");
  331. b.ToTable("AspNetUserTokens", (string)null);
  332. });
  333. modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
  334. {
  335. b.HasOne("MTWorkHR.Identity.Models.ApplicationRole", null)
  336. .WithMany()
  337. .HasForeignKey("UserRolesId")
  338. .OnDelete(DeleteBehavior.Cascade)
  339. .IsRequired();
  340. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", null)
  341. .WithMany()
  342. .HasForeignKey("UsersId")
  343. .OnDelete(DeleteBehavior.Cascade)
  344. .IsRequired();
  345. });
  346. modelBuilder.Entity("MTWorkHR.Identity.Models.ApplicationUser", b =>
  347. {
  348. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", "Manager")
  349. .WithMany()
  350. .HasForeignKey("ManagerId");
  351. b.Navigation("Manager");
  352. });
  353. modelBuilder.Entity("MTWorkHR.Identity.Models.RolePermission", b =>
  354. {
  355. b.HasOne("MTWorkHR.Identity.Models.Permission", "Permission")
  356. .WithMany()
  357. .HasForeignKey("PermissionId")
  358. .OnDelete(DeleteBehavior.Cascade)
  359. .IsRequired();
  360. b.HasOne("MTWorkHR.Identity.Models.ApplicationRole", "Role")
  361. .WithMany("RolePermissions")
  362. .HasForeignKey("RoleId")
  363. .OnDelete(DeleteBehavior.Cascade)
  364. .IsRequired();
  365. b.Navigation("Permission");
  366. b.Navigation("Role");
  367. });
  368. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  369. {
  370. b.HasOne("MTWorkHR.Identity.Models.ApplicationRole", null)
  371. .WithMany()
  372. .HasForeignKey("RoleId")
  373. .OnDelete(DeleteBehavior.Cascade)
  374. .IsRequired();
  375. });
  376. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  377. {
  378. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", null)
  379. .WithMany()
  380. .HasForeignKey("UserId")
  381. .OnDelete(DeleteBehavior.Cascade)
  382. .IsRequired();
  383. });
  384. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  385. {
  386. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", null)
  387. .WithMany()
  388. .HasForeignKey("UserId")
  389. .OnDelete(DeleteBehavior.Cascade)
  390. .IsRequired();
  391. });
  392. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  393. {
  394. b.HasOne("MTWorkHR.Identity.Models.ApplicationRole", null)
  395. .WithMany()
  396. .HasForeignKey("RoleId")
  397. .OnDelete(DeleteBehavior.Cascade)
  398. .IsRequired();
  399. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", null)
  400. .WithMany()
  401. .HasForeignKey("UserId")
  402. .OnDelete(DeleteBehavior.Cascade)
  403. .IsRequired();
  404. });
  405. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  406. {
  407. b.HasOne("MTWorkHR.Identity.Models.ApplicationUser", null)
  408. .WithMany()
  409. .HasForeignKey("UserId")
  410. .OnDelete(DeleteBehavior.Cascade)
  411. .IsRequired();
  412. });
  413. modelBuilder.Entity("MTWorkHR.Identity.Models.ApplicationRole", b =>
  414. {
  415. b.Navigation("RolePermissions");
  416. });
  417. #pragma warning restore 612, 618
  418. }
  419. }
  420. }