20240226083813_userHistory.Designer.cs 24 KB

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