HRIdentityDBContextModelSnapshot.cs 20 KB

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