HRDataContextModelSnapshot.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. // <auto-generated />
  2. using System;
  3. using MTWorkHR.Infrastructure.Data;
  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.Infrastructure.Migrations
  10. {
  11. [DbContext(typeof(HRDataContext))]
  12. partial class HRDataContextModelSnapshot : 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("MTWorkHR.Core.Entities.AuthLog", b =>
  22. {
  23. b.Property<long>("Id")
  24. .ValueGeneratedOnAdd()
  25. .HasColumnType("bigint")
  26. .HasColumnOrder(0);
  27. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  28. b.Property<string>("Channel")
  29. .HasColumnType("nvarchar(max)");
  30. b.Property<DateTime>("CreateDate")
  31. .HasColumnType("datetime2");
  32. b.Property<string>("CreateUser")
  33. .IsRequired()
  34. .HasColumnType("nvarchar(max)");
  35. b.Property<string>("ErrorCode")
  36. .IsRequired()
  37. .HasColumnType("nvarchar(max)");
  38. b.Property<string>("ErrorDescription")
  39. .IsRequired()
  40. .HasColumnType("nvarchar(max)");
  41. b.Property<string>("InnerException")
  42. .HasColumnType("nvarchar(max)");
  43. b.Property<string>("Input")
  44. .HasColumnType("nvarchar(max)");
  45. b.Property<string>("Method")
  46. .IsRequired()
  47. .HasColumnType("nvarchar(max)");
  48. b.Property<string>("QueryString")
  49. .HasColumnType("nvarchar(max)");
  50. b.Property<string>("ServerIP")
  51. .HasColumnType("nvarchar(max)");
  52. b.Property<string>("ServiceResponseTimeInSeconds")
  53. .IsRequired()
  54. .HasColumnType("nvarchar(max)");
  55. b.Property<string>("UserIP")
  56. .HasColumnType("nvarchar(max)");
  57. b.Property<string>("userAgent")
  58. .HasColumnType("nvarchar(max)");
  59. b.HasKey("Id");
  60. b.ToTable("AuthLogs");
  61. });
  62. modelBuilder.Entity("MTWorkHR.Core.Entities.Base.AttachmentType", b =>
  63. {
  64. b.Property<long>("Id")
  65. .ValueGeneratedOnAdd()
  66. .HasColumnType("bigint")
  67. .HasColumnOrder(0);
  68. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  69. b.Property<bool>("IsRequired")
  70. .HasColumnType("bit");
  71. b.Property<string>("NameAr")
  72. .IsRequired()
  73. .HasMaxLength(250)
  74. .HasColumnType("nvarchar(250)");
  75. b.Property<string>("NameEn")
  76. .IsRequired()
  77. .HasMaxLength(250)
  78. .HasColumnType("nvarchar(250)");
  79. b.HasKey("Id");
  80. b.ToTable("AttachmentType");
  81. b.HasData(
  82. new
  83. {
  84. Id = 1L,
  85. IsRequired = false,
  86. NameAr = "السيرة الذاتية",
  87. NameEn = "CV"
  88. },
  89. new
  90. {
  91. Id = 2L,
  92. IsRequired = false,
  93. NameAr = "الهوية",
  94. NameEn = "Identification"
  95. });
  96. });
  97. modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
  98. {
  99. b.Property<long>("Id")
  100. .ValueGeneratedOnAdd()
  101. .HasColumnType("bigint")
  102. .HasColumnOrder(0);
  103. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  104. b.Property<string>("CRNumber")
  105. .IsRequired()
  106. .HasColumnType("nvarchar(max)");
  107. b.Property<string>("CompanyName")
  108. .IsRequired()
  109. .HasColumnType("nvarchar(max)");
  110. b.Property<DateTime>("CreateDate")
  111. .HasColumnType("datetime2")
  112. .HasColumnOrder(3);
  113. b.Property<string>("CreateUser")
  114. .HasMaxLength(450)
  115. .HasColumnType("nvarchar(450)")
  116. .HasColumnOrder(1);
  117. b.Property<bool>("IsDeleted")
  118. .HasColumnType("bit");
  119. b.Property<int>("TaxNumber")
  120. .HasColumnType("int");
  121. b.Property<DateTime?>("UpdateDate")
  122. .HasColumnType("datetime2")
  123. .HasColumnOrder(4);
  124. b.Property<string>("UpdateUser")
  125. .HasMaxLength(450)
  126. .HasColumnType("nvarchar(450)")
  127. .HasColumnOrder(2);
  128. b.Property<long>("UserId")
  129. .HasColumnType("bigint");
  130. b.HasKey("Id");
  131. b.ToTable("Companies");
  132. });
  133. modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
  134. {
  135. b.Property<long>("Id")
  136. .ValueGeneratedOnAdd()
  137. .HasColumnType("bigint")
  138. .HasColumnOrder(0);
  139. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  140. b.Property<string>("Channel")
  141. .HasColumnType("nvarchar(max)");
  142. b.Property<DateTime>("CreateDate")
  143. .HasColumnType("datetime2");
  144. b.Property<string>("CreateUser")
  145. .IsRequired()
  146. .HasColumnType("nvarchar(max)");
  147. b.Property<string>("ErrorCode")
  148. .IsRequired()
  149. .HasColumnType("nvarchar(max)");
  150. b.Property<string>("ErrorDescription")
  151. .IsRequired()
  152. .HasColumnType("nvarchar(max)");
  153. b.Property<string>("InnerException")
  154. .HasColumnType("nvarchar(max)");
  155. b.Property<string>("Input")
  156. .HasColumnType("nvarchar(max)");
  157. b.Property<string>("Method")
  158. .IsRequired()
  159. .HasColumnType("nvarchar(max)");
  160. b.Property<string>("QueryString")
  161. .HasColumnType("nvarchar(max)");
  162. b.Property<string>("ServerIP")
  163. .HasColumnType("nvarchar(max)");
  164. b.Property<string>("ServiceResponseTimeInSeconds")
  165. .IsRequired()
  166. .HasColumnType("nvarchar(max)");
  167. b.Property<string>("UserIP")
  168. .HasColumnType("nvarchar(max)");
  169. b.Property<string>("userAgent")
  170. .HasColumnType("nvarchar(max)");
  171. b.HasKey("Id");
  172. b.ToTable("FileLogs");
  173. });
  174. modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
  175. {
  176. b.Property<long>("Id")
  177. .ValueGeneratedOnAdd()
  178. .HasColumnType("bigint")
  179. .HasColumnOrder(0);
  180. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  181. b.Property<string>("NameAr")
  182. .IsRequired()
  183. .HasMaxLength(250)
  184. .HasColumnType("nvarchar(250)");
  185. b.Property<string>("NameEn")
  186. .IsRequired()
  187. .HasMaxLength(250)
  188. .HasColumnType("nvarchar(250)");
  189. b.HasKey("Id");
  190. b.ToTable("Projects");
  191. });
  192. modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
  193. {
  194. b.Property<long>("Id")
  195. .ValueGeneratedOnAdd()
  196. .HasColumnType("bigint")
  197. .HasColumnOrder(0);
  198. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  199. b.Property<string>("Channel")
  200. .HasColumnType("nvarchar(max)");
  201. b.Property<DateTime>("CreateDate")
  202. .HasColumnType("datetime2");
  203. b.Property<string>("CreateUser")
  204. .IsRequired()
  205. .HasColumnType("nvarchar(max)");
  206. b.Property<string>("ErrorCode")
  207. .IsRequired()
  208. .HasColumnType("nvarchar(max)");
  209. b.Property<string>("ErrorDescription")
  210. .IsRequired()
  211. .HasColumnType("nvarchar(max)");
  212. b.Property<string>("InnerException")
  213. .HasColumnType("nvarchar(max)");
  214. b.Property<string>("Input")
  215. .HasColumnType("nvarchar(max)");
  216. b.Property<string>("Method")
  217. .IsRequired()
  218. .HasColumnType("nvarchar(max)");
  219. b.Property<string>("QueryString")
  220. .HasColumnType("nvarchar(max)");
  221. b.Property<string>("ServerIP")
  222. .HasColumnType("nvarchar(max)");
  223. b.Property<string>("ServiceResponseTimeInSeconds")
  224. .IsRequired()
  225. .HasColumnType("nvarchar(max)");
  226. b.Property<string>("UserIP")
  227. .HasColumnType("nvarchar(max)");
  228. b.Property<string>("userAgent")
  229. .HasColumnType("nvarchar(max)");
  230. b.HasKey("Id");
  231. b.ToTable("RoleLogs");
  232. });
  233. modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
  234. {
  235. b.Property<long>("Id")
  236. .ValueGeneratedOnAdd()
  237. .HasColumnType("bigint")
  238. .HasColumnOrder(0);
  239. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  240. b.Property<string>("Channel")
  241. .HasColumnType("nvarchar(max)");
  242. b.Property<DateTime>("CreateDate")
  243. .HasColumnType("datetime2");
  244. b.Property<string>("CreateUser")
  245. .IsRequired()
  246. .HasColumnType("nvarchar(max)");
  247. b.Property<string>("ErrorCode")
  248. .IsRequired()
  249. .HasColumnType("nvarchar(max)");
  250. b.Property<string>("ErrorDescription")
  251. .IsRequired()
  252. .HasColumnType("nvarchar(max)");
  253. b.Property<string>("InnerException")
  254. .HasColumnType("nvarchar(max)");
  255. b.Property<string>("Input")
  256. .HasColumnType("nvarchar(max)");
  257. b.Property<string>("Method")
  258. .IsRequired()
  259. .HasColumnType("nvarchar(max)");
  260. b.Property<string>("QueryString")
  261. .HasColumnType("nvarchar(max)");
  262. b.Property<string>("ServerIP")
  263. .HasColumnType("nvarchar(max)");
  264. b.Property<string>("ServiceResponseTimeInSeconds")
  265. .IsRequired()
  266. .HasColumnType("nvarchar(max)");
  267. b.Property<string>("UserIP")
  268. .HasColumnType("nvarchar(max)");
  269. b.Property<string>("userAgent")
  270. .HasColumnType("nvarchar(max)");
  271. b.HasKey("Id");
  272. b.ToTable("SettingLogs");
  273. });
  274. modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
  275. {
  276. b.Property<long>("Id")
  277. .ValueGeneratedOnAdd()
  278. .HasColumnType("bigint")
  279. .HasColumnOrder(0);
  280. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  281. b.Property<string>("Channel")
  282. .HasColumnType("nvarchar(max)");
  283. b.Property<DateTime>("CreateDate")
  284. .HasColumnType("datetime2");
  285. b.Property<string>("CreateUser")
  286. .IsRequired()
  287. .HasColumnType("nvarchar(max)");
  288. b.Property<string>("ErrorCode")
  289. .IsRequired()
  290. .HasColumnType("nvarchar(max)");
  291. b.Property<string>("ErrorDescription")
  292. .IsRequired()
  293. .HasColumnType("nvarchar(max)");
  294. b.Property<string>("InnerException")
  295. .HasColumnType("nvarchar(max)");
  296. b.Property<string>("Input")
  297. .HasColumnType("nvarchar(max)");
  298. b.Property<string>("Method")
  299. .IsRequired()
  300. .HasColumnType("nvarchar(max)");
  301. b.Property<string>("QueryString")
  302. .HasColumnType("nvarchar(max)");
  303. b.Property<string>("ServerIP")
  304. .HasColumnType("nvarchar(max)");
  305. b.Property<string>("ServiceResponseTimeInSeconds")
  306. .IsRequired()
  307. .HasColumnType("nvarchar(max)");
  308. b.Property<string>("UserIP")
  309. .HasColumnType("nvarchar(max)");
  310. b.Property<string>("userAgent")
  311. .HasColumnType("nvarchar(max)");
  312. b.HasKey("Id");
  313. b.ToTable("UserLogs");
  314. });
  315. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  316. {
  317. b.Property<long>("Id")
  318. .ValueGeneratedOnAdd()
  319. .HasColumnType("bigint")
  320. .HasColumnOrder(0);
  321. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  322. b.Property<long>("AssignedUserId")
  323. .HasColumnType("bigint");
  324. b.Property<DateTime>("CreateDate")
  325. .HasColumnType("datetime2")
  326. .HasColumnOrder(3);
  327. b.Property<string>("CreateUser")
  328. .HasMaxLength(450)
  329. .HasColumnType("nvarchar(450)")
  330. .HasColumnOrder(1);
  331. b.Property<string>("DeleteUserId")
  332. .HasMaxLength(450)
  333. .HasColumnType("nvarchar(450)")
  334. .HasColumnOrder(8);
  335. b.Property<string>("Description")
  336. .IsRequired()
  337. .HasColumnType("nvarchar(max)");
  338. b.Property<DateTime>("DueDate")
  339. .HasColumnType("datetime2");
  340. b.Property<bool>("IsDeleted")
  341. .HasColumnType("bit")
  342. .HasColumnOrder(7);
  343. b.Property<int>("Priority")
  344. .HasColumnType("int");
  345. b.Property<long>("ProjectId")
  346. .HasColumnType("bigint");
  347. b.Property<long>("StatusId")
  348. .HasColumnType("bigint");
  349. b.Property<string>("Title")
  350. .IsRequired()
  351. .HasColumnType("nvarchar(max)");
  352. b.Property<DateTime?>("UpdateDate")
  353. .HasColumnType("datetime2")
  354. .HasColumnOrder(4);
  355. b.Property<string>("UpdateUser")
  356. .HasMaxLength(450)
  357. .HasColumnType("nvarchar(450)")
  358. .HasColumnOrder(2);
  359. b.HasKey("Id");
  360. b.HasIndex("ProjectId");
  361. b.HasIndex("StatusId");
  362. b.ToTable("UserTasks");
  363. });
  364. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  365. {
  366. b.Property<long>("Id")
  367. .ValueGeneratedOnAdd()
  368. .HasColumnType("bigint")
  369. .HasColumnOrder(0);
  370. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  371. b.Property<long>("AttachmentTypeId")
  372. .HasColumnType("bigint");
  373. b.Property<DateTime>("CreateDate")
  374. .HasColumnType("datetime2")
  375. .HasColumnOrder(3);
  376. b.Property<string>("CreateUser")
  377. .HasMaxLength(450)
  378. .HasColumnType("nvarchar(450)")
  379. .HasColumnOrder(1);
  380. b.Property<string>("FileName")
  381. .IsRequired()
  382. .HasMaxLength(250)
  383. .HasColumnType("nvarchar(250)");
  384. b.Property<string>("OriginalName")
  385. .IsRequired()
  386. .HasMaxLength(250)
  387. .HasColumnType("nvarchar(250)");
  388. b.Property<long>("TaskId")
  389. .HasColumnType("bigint");
  390. b.Property<DateTime?>("UpdateDate")
  391. .HasColumnType("datetime2")
  392. .HasColumnOrder(4);
  393. b.Property<string>("UpdateUser")
  394. .HasMaxLength(450)
  395. .HasColumnType("nvarchar(450)")
  396. .HasColumnOrder(2);
  397. b.HasKey("Id");
  398. b.HasIndex("AttachmentTypeId");
  399. b.HasIndex("TaskId");
  400. b.ToTable("UserTaskAttachments");
  401. });
  402. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  403. {
  404. b.Property<long>("Id")
  405. .ValueGeneratedOnAdd()
  406. .HasColumnType("bigint")
  407. .HasColumnOrder(0);
  408. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  409. b.Property<long>("AssignedToUserId")
  410. .HasColumnType("bigint");
  411. b.Property<string>("Comment")
  412. .IsRequired()
  413. .HasMaxLength(500)
  414. .HasColumnType("nvarchar(500)");
  415. b.Property<DateTime>("CreateDate")
  416. .HasColumnType("datetime2")
  417. .HasColumnOrder(3);
  418. b.Property<string>("CreateUser")
  419. .HasMaxLength(450)
  420. .HasColumnType("nvarchar(450)")
  421. .HasColumnOrder(1);
  422. b.Property<long>("CurrentStatusId")
  423. .HasColumnType("bigint");
  424. b.Property<bool>("IsDeleted")
  425. .HasColumnType("bit");
  426. b.Property<DateTime?>("UpdateDate")
  427. .HasColumnType("datetime2")
  428. .HasColumnOrder(4);
  429. b.Property<string>("UpdateUser")
  430. .HasMaxLength(450)
  431. .HasColumnType("nvarchar(450)")
  432. .HasColumnOrder(2);
  433. b.Property<long?>("UserTaskId")
  434. .HasColumnType("bigint");
  435. b.HasKey("Id");
  436. b.HasIndex("CurrentStatusId");
  437. b.HasIndex("UserTaskId");
  438. b.ToTable("UserTaskHistories");
  439. });
  440. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
  441. {
  442. b.Property<long>("Id")
  443. .ValueGeneratedOnAdd()
  444. .HasColumnType("bigint")
  445. .HasColumnOrder(0);
  446. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  447. b.Property<string>("NameAr")
  448. .IsRequired()
  449. .HasMaxLength(250)
  450. .HasColumnType("nvarchar(250)");
  451. b.Property<string>("NameEn")
  452. .IsRequired()
  453. .HasMaxLength(250)
  454. .HasColumnType("nvarchar(250)");
  455. b.HasKey("Id");
  456. b.ToTable("UserTaskStatuses");
  457. });
  458. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  459. {
  460. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  461. .WithMany()
  462. .HasForeignKey("ProjectId")
  463. .OnDelete(DeleteBehavior.Cascade)
  464. .IsRequired();
  465. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  466. .WithMany()
  467. .HasForeignKey("StatusId")
  468. .OnDelete(DeleteBehavior.Cascade)
  469. .IsRequired();
  470. b.Navigation("Project");
  471. b.Navigation("TaskStatus");
  472. });
  473. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  474. {
  475. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  476. .WithMany()
  477. .HasForeignKey("AttachmentTypeId")
  478. .OnDelete(DeleteBehavior.Cascade)
  479. .IsRequired();
  480. b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
  481. .WithMany("TaskAttachments")
  482. .HasForeignKey("TaskId")
  483. .OnDelete(DeleteBehavior.Cascade)
  484. .IsRequired();
  485. b.Navigation("AttachmentType");
  486. b.Navigation("UserTask");
  487. });
  488. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  489. {
  490. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  491. .WithMany()
  492. .HasForeignKey("CurrentStatusId")
  493. .OnDelete(DeleteBehavior.Cascade)
  494. .IsRequired();
  495. b.HasOne("MTWorkHR.Core.Entities.UserTask", null)
  496. .WithMany("UserTaskHistories")
  497. .HasForeignKey("UserTaskId");
  498. b.Navigation("TaskStatus");
  499. });
  500. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  501. {
  502. b.Navigation("TaskAttachments");
  503. b.Navigation("UserTaskHistories");
  504. });
  505. #pragma warning restore 612, 618
  506. }
  507. }
  508. }