20240225115219_UserTasks.Designer.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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("20240225115219_UserTasks")]
  14. partial class UserTasks
  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. .IsRequired()
  336. .HasMaxLength(450)
  337. .HasColumnType("nvarchar(450)")
  338. .HasColumnOrder(8);
  339. b.Property<string>("Description")
  340. .IsRequired()
  341. .HasColumnType("nvarchar(max)");
  342. b.Property<DateTime>("DueDate")
  343. .HasColumnType("datetime2");
  344. b.Property<bool>("IsDeleted")
  345. .HasColumnType("bit")
  346. .HasColumnOrder(7);
  347. b.Property<int>("Priority")
  348. .HasColumnType("int");
  349. b.Property<long>("ProjectId")
  350. .HasColumnType("bigint");
  351. b.Property<long>("StatusId")
  352. .HasColumnType("bigint");
  353. b.Property<string>("Title")
  354. .IsRequired()
  355. .HasColumnType("nvarchar(max)");
  356. b.Property<DateTime?>("UpdateDate")
  357. .HasColumnType("datetime2")
  358. .HasColumnOrder(4);
  359. b.Property<string>("UpdateUser")
  360. .HasMaxLength(450)
  361. .HasColumnType("nvarchar(450)")
  362. .HasColumnOrder(2);
  363. b.HasKey("Id");
  364. b.HasIndex("ProjectId");
  365. b.HasIndex("StatusId");
  366. b.ToTable("UserTasks");
  367. });
  368. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  369. {
  370. b.Property<long>("Id")
  371. .ValueGeneratedOnAdd()
  372. .HasColumnType("bigint")
  373. .HasColumnOrder(0);
  374. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  375. b.Property<long>("AttachmentTypeId")
  376. .HasColumnType("bigint");
  377. b.Property<DateTime>("CreateDate")
  378. .HasColumnType("datetime2")
  379. .HasColumnOrder(3);
  380. b.Property<string>("CreateUser")
  381. .HasMaxLength(450)
  382. .HasColumnType("nvarchar(450)")
  383. .HasColumnOrder(1);
  384. b.Property<string>("FileName")
  385. .IsRequired()
  386. .HasMaxLength(250)
  387. .HasColumnType("nvarchar(250)");
  388. b.Property<string>("OriginalName")
  389. .IsRequired()
  390. .HasMaxLength(250)
  391. .HasColumnType("nvarchar(250)");
  392. b.Property<long>("TaskId")
  393. .HasColumnType("bigint");
  394. b.Property<DateTime?>("UpdateDate")
  395. .HasColumnType("datetime2")
  396. .HasColumnOrder(4);
  397. b.Property<string>("UpdateUser")
  398. .HasMaxLength(450)
  399. .HasColumnType("nvarchar(450)")
  400. .HasColumnOrder(2);
  401. b.HasKey("Id");
  402. b.HasIndex("AttachmentTypeId");
  403. b.HasIndex("TaskId");
  404. b.ToTable("UserTaskAttachments");
  405. });
  406. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  407. {
  408. b.Property<long>("Id")
  409. .ValueGeneratedOnAdd()
  410. .HasColumnType("bigint")
  411. .HasColumnOrder(0);
  412. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  413. b.Property<long>("AssignedToUserId")
  414. .HasColumnType("bigint");
  415. b.Property<string>("Comment")
  416. .IsRequired()
  417. .HasMaxLength(500)
  418. .HasColumnType("nvarchar(500)");
  419. b.Property<DateTime>("CreateDate")
  420. .HasColumnType("datetime2")
  421. .HasColumnOrder(3);
  422. b.Property<string>("CreateUser")
  423. .HasMaxLength(450)
  424. .HasColumnType("nvarchar(450)")
  425. .HasColumnOrder(1);
  426. b.Property<long>("CurrentStatusId")
  427. .HasColumnType("bigint");
  428. b.Property<bool>("IsDeleted")
  429. .HasColumnType("bit");
  430. b.Property<DateTime?>("UpdateDate")
  431. .HasColumnType("datetime2")
  432. .HasColumnOrder(4);
  433. b.Property<string>("UpdateUser")
  434. .HasMaxLength(450)
  435. .HasColumnType("nvarchar(450)")
  436. .HasColumnOrder(2);
  437. b.HasKey("Id");
  438. b.HasIndex("CurrentStatusId");
  439. b.ToTable("UserTaskHistories");
  440. });
  441. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
  442. {
  443. b.Property<long>("Id")
  444. .ValueGeneratedOnAdd()
  445. .HasColumnType("bigint")
  446. .HasColumnOrder(0);
  447. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  448. b.Property<string>("NameAr")
  449. .IsRequired()
  450. .HasMaxLength(250)
  451. .HasColumnType("nvarchar(250)");
  452. b.Property<string>("NameEn")
  453. .IsRequired()
  454. .HasMaxLength(250)
  455. .HasColumnType("nvarchar(250)");
  456. b.HasKey("Id");
  457. b.ToTable("UserTaskStatuses");
  458. });
  459. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  460. {
  461. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  462. .WithMany()
  463. .HasForeignKey("ProjectId")
  464. .OnDelete(DeleteBehavior.Cascade)
  465. .IsRequired();
  466. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  467. .WithMany()
  468. .HasForeignKey("StatusId")
  469. .OnDelete(DeleteBehavior.Cascade)
  470. .IsRequired();
  471. b.Navigation("Project");
  472. b.Navigation("TaskStatus");
  473. });
  474. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  475. {
  476. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  477. .WithMany()
  478. .HasForeignKey("AttachmentTypeId")
  479. .OnDelete(DeleteBehavior.Cascade)
  480. .IsRequired();
  481. b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
  482. .WithMany("TaskAttachments")
  483. .HasForeignKey("TaskId")
  484. .OnDelete(DeleteBehavior.Cascade)
  485. .IsRequired();
  486. b.Navigation("AttachmentType");
  487. b.Navigation("UserTask");
  488. });
  489. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  490. {
  491. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  492. .WithMany()
  493. .HasForeignKey("CurrentStatusId")
  494. .OnDelete(DeleteBehavior.Cascade)
  495. .IsRequired();
  496. b.Navigation("TaskStatus");
  497. });
  498. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  499. {
  500. b.Navigation("TaskAttachments");
  501. });
  502. #pragma warning restore 612, 618
  503. }
  504. }
  505. }