20240319090340_altrOrder.Designer.cs 82 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242
  1. // <auto-generated />
  2. using System;
  3. using MTWorkHR.Infrastructure.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.Infrastructure.Migrations
  11. {
  12. [DbContext(typeof(HRDataContext))]
  13. [Migration("20240319090340_altrOrder")]
  14. partial class altrOrder
  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.Core.Entities.Attendance", b =>
  35. {
  36. b.Property<long>("Id")
  37. .ValueGeneratedOnAdd()
  38. .HasColumnType("bigint")
  39. .HasColumnOrder(0);
  40. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  41. b.Property<DateTime>("AttendanceDate")
  42. .HasColumnType("datetime2");
  43. b.Property<DateTime?>("CheckInTime")
  44. .HasColumnType("datetime2");
  45. b.Property<DateTime?>("CheckOutTime")
  46. .HasColumnType("datetime2");
  47. b.Property<DateTime>("CreateDate")
  48. .HasColumnType("datetime2")
  49. .HasColumnOrder(3);
  50. b.Property<string>("CreateUser")
  51. .HasMaxLength(450)
  52. .HasColumnType("nvarchar(450)")
  53. .HasColumnOrder(1);
  54. b.Property<string>("DeleteUserId")
  55. .HasMaxLength(450)
  56. .HasColumnType("nvarchar(450)")
  57. .HasColumnOrder(8);
  58. b.Property<bool>("IsDeleted")
  59. .HasColumnType("bit")
  60. .HasColumnOrder(7);
  61. b.Property<string>("LeaveReason")
  62. .HasMaxLength(250)
  63. .HasColumnType("nvarchar(250)");
  64. b.Property<int>("LeaveType")
  65. .HasColumnType("int");
  66. b.Property<DateTime?>("UpdateDate")
  67. .HasColumnType("datetime2")
  68. .HasColumnOrder(4);
  69. b.Property<string>("UpdateUser")
  70. .HasMaxLength(450)
  71. .HasColumnType("nvarchar(450)")
  72. .HasColumnOrder(2);
  73. b.Property<string>("UserId")
  74. .IsRequired()
  75. .HasColumnType("nvarchar(max)");
  76. b.Property<string>("UserName")
  77. .HasColumnType("nvarchar(max)");
  78. b.HasKey("Id");
  79. b.ToTable("Attendances");
  80. });
  81. modelBuilder.Entity("MTWorkHR.Core.Entities.AttendanceLog", b =>
  82. {
  83. b.Property<long>("Id")
  84. .ValueGeneratedOnAdd()
  85. .HasColumnType("bigint")
  86. .HasColumnOrder(0);
  87. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  88. b.Property<string>("Channel")
  89. .HasColumnType("nvarchar(max)");
  90. b.Property<DateTime>("CreateDate")
  91. .HasColumnType("datetime2");
  92. b.Property<string>("CreateUser")
  93. .IsRequired()
  94. .HasColumnType("nvarchar(max)");
  95. b.Property<string>("ErrorCode")
  96. .IsRequired()
  97. .HasColumnType("nvarchar(max)");
  98. b.Property<string>("ErrorDescription")
  99. .IsRequired()
  100. .HasColumnType("nvarchar(max)");
  101. b.Property<string>("InnerException")
  102. .HasColumnType("nvarchar(max)");
  103. b.Property<string>("Input")
  104. .HasColumnType("nvarchar(max)");
  105. b.Property<string>("Method")
  106. .IsRequired()
  107. .HasColumnType("nvarchar(max)");
  108. b.Property<string>("QueryString")
  109. .HasColumnType("nvarchar(max)");
  110. b.Property<string>("ServerIP")
  111. .HasColumnType("nvarchar(max)");
  112. b.Property<string>("ServiceResponseTimeInSeconds")
  113. .IsRequired()
  114. .HasColumnType("nvarchar(max)");
  115. b.Property<string>("UserIP")
  116. .HasColumnType("nvarchar(max)");
  117. b.Property<string>("userAgent")
  118. .HasColumnType("nvarchar(max)");
  119. b.HasKey("Id");
  120. b.ToTable("AttendanceLogs");
  121. });
  122. modelBuilder.Entity("MTWorkHR.Core.Entities.AuthLog", b =>
  123. {
  124. b.Property<long>("Id")
  125. .ValueGeneratedOnAdd()
  126. .HasColumnType("bigint")
  127. .HasColumnOrder(0);
  128. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  129. b.Property<string>("Channel")
  130. .HasColumnType("nvarchar(max)");
  131. b.Property<DateTime>("CreateDate")
  132. .HasColumnType("datetime2");
  133. b.Property<string>("CreateUser")
  134. .IsRequired()
  135. .HasColumnType("nvarchar(max)");
  136. b.Property<string>("ErrorCode")
  137. .IsRequired()
  138. .HasColumnType("nvarchar(max)");
  139. b.Property<string>("ErrorDescription")
  140. .IsRequired()
  141. .HasColumnType("nvarchar(max)");
  142. b.Property<string>("InnerException")
  143. .HasColumnType("nvarchar(max)");
  144. b.Property<string>("Input")
  145. .HasColumnType("nvarchar(max)");
  146. b.Property<string>("Method")
  147. .IsRequired()
  148. .HasColumnType("nvarchar(max)");
  149. b.Property<string>("QueryString")
  150. .HasColumnType("nvarchar(max)");
  151. b.Property<string>("ServerIP")
  152. .HasColumnType("nvarchar(max)");
  153. b.Property<string>("ServiceResponseTimeInSeconds")
  154. .IsRequired()
  155. .HasColumnType("nvarchar(max)");
  156. b.Property<string>("UserIP")
  157. .HasColumnType("nvarchar(max)");
  158. b.Property<string>("userAgent")
  159. .HasColumnType("nvarchar(max)");
  160. b.HasKey("Id");
  161. b.ToTable("AuthLogs");
  162. });
  163. modelBuilder.Entity("MTWorkHR.Core.Entities.Base.AttachmentType", b =>
  164. {
  165. b.Property<long>("Id")
  166. .ValueGeneratedOnAdd()
  167. .HasColumnType("bigint")
  168. .HasColumnOrder(0);
  169. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  170. b.Property<bool>("IsRequired")
  171. .HasColumnType("bit");
  172. b.Property<string>("NameAr")
  173. .IsRequired()
  174. .HasMaxLength(250)
  175. .HasColumnType("nvarchar(250)");
  176. b.Property<string>("NameEn")
  177. .IsRequired()
  178. .HasMaxLength(250)
  179. .HasColumnType("nvarchar(250)");
  180. b.HasKey("Id");
  181. b.ToTable("AttachmentTypes");
  182. b.HasData(
  183. new
  184. {
  185. Id = 1L,
  186. IsRequired = false,
  187. NameAr = "السيرة الذاتية",
  188. NameEn = "CV"
  189. },
  190. new
  191. {
  192. Id = 2L,
  193. IsRequired = false,
  194. NameAr = "الهوية",
  195. NameEn = "Identification"
  196. });
  197. });
  198. modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
  199. {
  200. b.Property<long>("Id")
  201. .ValueGeneratedOnAdd()
  202. .HasColumnType("bigint")
  203. .HasColumnOrder(0);
  204. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  205. b.Property<string>("CRNumber")
  206. .IsRequired()
  207. .HasColumnType("nvarchar(max)");
  208. b.Property<string>("CompanyName")
  209. .IsRequired()
  210. .HasColumnType("nvarchar(max)");
  211. b.Property<DateTime>("CreateDate")
  212. .HasColumnType("datetime2")
  213. .HasColumnOrder(3);
  214. b.Property<string>("CreateUser")
  215. .HasMaxLength(450)
  216. .HasColumnType("nvarchar(450)")
  217. .HasColumnOrder(1);
  218. b.Property<string>("DeleteUserId")
  219. .HasMaxLength(450)
  220. .HasColumnType("nvarchar(450)")
  221. .HasColumnOrder(8);
  222. b.Property<bool>("IsDeleted")
  223. .HasColumnType("bit")
  224. .HasColumnOrder(7);
  225. b.Property<int>("TaxNumber")
  226. .HasColumnType("int");
  227. b.Property<DateTime?>("UpdateDate")
  228. .HasColumnType("datetime2")
  229. .HasColumnOrder(4);
  230. b.Property<string>("UpdateUser")
  231. .HasMaxLength(450)
  232. .HasColumnType("nvarchar(450)")
  233. .HasColumnOrder(2);
  234. b.Property<long>("UserId")
  235. .HasColumnType("bigint");
  236. b.HasKey("Id");
  237. b.ToTable("Companies");
  238. });
  239. modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
  240. {
  241. b.Property<long>("Id")
  242. .ValueGeneratedOnAdd()
  243. .HasColumnType("bigint")
  244. .HasColumnOrder(0);
  245. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  246. b.Property<string>("Channel")
  247. .HasColumnType("nvarchar(max)");
  248. b.Property<DateTime>("CreateDate")
  249. .HasColumnType("datetime2");
  250. b.Property<string>("CreateUser")
  251. .IsRequired()
  252. .HasColumnType("nvarchar(max)");
  253. b.Property<string>("ErrorCode")
  254. .IsRequired()
  255. .HasColumnType("nvarchar(max)");
  256. b.Property<string>("ErrorDescription")
  257. .IsRequired()
  258. .HasColumnType("nvarchar(max)");
  259. b.Property<string>("InnerException")
  260. .HasColumnType("nvarchar(max)");
  261. b.Property<string>("Input")
  262. .HasColumnType("nvarchar(max)");
  263. b.Property<string>("Method")
  264. .IsRequired()
  265. .HasColumnType("nvarchar(max)");
  266. b.Property<string>("QueryString")
  267. .HasColumnType("nvarchar(max)");
  268. b.Property<string>("ServerIP")
  269. .HasColumnType("nvarchar(max)");
  270. b.Property<string>("ServiceResponseTimeInSeconds")
  271. .IsRequired()
  272. .HasColumnType("nvarchar(max)");
  273. b.Property<string>("UserIP")
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<string>("userAgent")
  276. .HasColumnType("nvarchar(max)");
  277. b.HasKey("Id");
  278. b.ToTable("FileLogs");
  279. });
  280. modelBuilder.Entity("MTWorkHR.Core.Entities.LeaveType", b =>
  281. {
  282. b.Property<long>("Id")
  283. .ValueGeneratedOnAdd()
  284. .HasColumnType("bigint")
  285. .HasColumnOrder(0);
  286. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  287. b.Property<DateTime>("CreateDate")
  288. .HasColumnType("datetime2")
  289. .HasColumnOrder(3);
  290. b.Property<string>("CreateUser")
  291. .HasMaxLength(450)
  292. .HasColumnType("nvarchar(450)")
  293. .HasColumnOrder(1);
  294. b.Property<int>("DefaultDays")
  295. .HasColumnType("int");
  296. b.Property<string>("NameAr")
  297. .IsRequired()
  298. .HasColumnType("nvarchar(max)");
  299. b.Property<string>("NameEn")
  300. .IsRequired()
  301. .HasColumnType("nvarchar(max)");
  302. b.Property<DateTime?>("UpdateDate")
  303. .HasColumnType("datetime2")
  304. .HasColumnOrder(4);
  305. b.Property<string>("UpdateUser")
  306. .HasMaxLength(450)
  307. .HasColumnType("nvarchar(450)")
  308. .HasColumnOrder(2);
  309. b.HasKey("Id");
  310. b.ToTable("LeaveTypes");
  311. });
  312. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  313. {
  314. b.Property<long>("Id")
  315. .ValueGeneratedOnAdd()
  316. .HasColumnType("bigint")
  317. .HasColumnOrder(0);
  318. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  319. b.Property<DateTime>("CreateDate")
  320. .HasColumnType("datetime2")
  321. .HasColumnOrder(3);
  322. b.Property<string>("CreateUser")
  323. .HasMaxLength(450)
  324. .HasColumnType("nvarchar(450)")
  325. .HasColumnOrder(1);
  326. b.Property<string>("DeleteUserId")
  327. .HasMaxLength(450)
  328. .HasColumnType("nvarchar(450)")
  329. .HasColumnOrder(8);
  330. b.Property<string>("Description")
  331. .HasMaxLength(500)
  332. .HasColumnType("nvarchar(500)");
  333. b.Property<DateTime>("EndDate")
  334. .HasColumnType("datetime2");
  335. b.Property<bool>("IsDeleted")
  336. .HasColumnType("bit")
  337. .HasColumnOrder(7);
  338. b.Property<string>("Location")
  339. .HasMaxLength(250)
  340. .HasColumnType("nvarchar(250)");
  341. b.Property<string>("MeetingLink")
  342. .HasMaxLength(250)
  343. .HasColumnType("nvarchar(250)");
  344. b.Property<DateTime>("StartDate")
  345. .HasColumnType("datetime2");
  346. b.Property<string>("Title")
  347. .IsRequired()
  348. .HasMaxLength(250)
  349. .HasColumnType("nvarchar(250)");
  350. b.Property<DateTime?>("UpdateDate")
  351. .HasColumnType("datetime2")
  352. .HasColumnOrder(4);
  353. b.Property<string>("UpdateUser")
  354. .HasMaxLength(450)
  355. .HasColumnType("nvarchar(450)")
  356. .HasColumnOrder(2);
  357. b.HasKey("Id");
  358. b.ToTable("Meetings");
  359. });
  360. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingLog", b =>
  361. {
  362. b.Property<long>("Id")
  363. .ValueGeneratedOnAdd()
  364. .HasColumnType("bigint")
  365. .HasColumnOrder(0);
  366. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  367. b.Property<string>("Channel")
  368. .HasColumnType("nvarchar(max)");
  369. b.Property<DateTime>("CreateDate")
  370. .HasColumnType("datetime2");
  371. b.Property<string>("CreateUser")
  372. .IsRequired()
  373. .HasColumnType("nvarchar(max)");
  374. b.Property<string>("ErrorCode")
  375. .IsRequired()
  376. .HasColumnType("nvarchar(max)");
  377. b.Property<string>("ErrorDescription")
  378. .IsRequired()
  379. .HasColumnType("nvarchar(max)");
  380. b.Property<string>("InnerException")
  381. .HasColumnType("nvarchar(max)");
  382. b.Property<string>("Input")
  383. .HasColumnType("nvarchar(max)");
  384. b.Property<string>("Method")
  385. .IsRequired()
  386. .HasColumnType("nvarchar(max)");
  387. b.Property<string>("QueryString")
  388. .HasColumnType("nvarchar(max)");
  389. b.Property<string>("ServerIP")
  390. .HasColumnType("nvarchar(max)");
  391. b.Property<string>("ServiceResponseTimeInSeconds")
  392. .IsRequired()
  393. .HasColumnType("nvarchar(max)");
  394. b.Property<string>("UserIP")
  395. .HasColumnType("nvarchar(max)");
  396. b.Property<string>("userAgent")
  397. .HasColumnType("nvarchar(max)");
  398. b.HasKey("Id");
  399. b.ToTable("MeetingLogs");
  400. });
  401. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  402. {
  403. b.Property<long>("Id")
  404. .ValueGeneratedOnAdd()
  405. .HasColumnType("bigint")
  406. .HasColumnOrder(0);
  407. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  408. b.Property<string>("AssignedUserId")
  409. .IsRequired()
  410. .HasColumnType("nvarchar(max)");
  411. b.Property<DateTime>("CreateDate")
  412. .HasColumnType("datetime2")
  413. .HasColumnOrder(3);
  414. b.Property<string>("CreateUser")
  415. .HasMaxLength(450)
  416. .HasColumnType("nvarchar(450)")
  417. .HasColumnOrder(1);
  418. b.Property<long>("MeetingId")
  419. .HasColumnType("bigint");
  420. b.Property<DateTime?>("UpdateDate")
  421. .HasColumnType("datetime2")
  422. .HasColumnOrder(4);
  423. b.Property<string>("UpdateUser")
  424. .HasMaxLength(450)
  425. .HasColumnType("nvarchar(450)")
  426. .HasColumnOrder(2);
  427. b.HasKey("Id");
  428. b.HasIndex("MeetingId");
  429. b.ToTable("MeetingUser");
  430. });
  431. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAllocation", b =>
  432. {
  433. b.Property<long>("Id")
  434. .ValueGeneratedOnAdd()
  435. .HasColumnType("bigint")
  436. .HasColumnOrder(0);
  437. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  438. b.Property<DateTime>("CreateDate")
  439. .HasColumnType("datetime2")
  440. .HasColumnOrder(3);
  441. b.Property<string>("CreateUser")
  442. .HasMaxLength(450)
  443. .HasColumnType("nvarchar(450)")
  444. .HasColumnOrder(1);
  445. b.Property<string>("EmployeeId")
  446. .IsRequired()
  447. .HasColumnType("nvarchar(max)");
  448. b.Property<int>("NumberOfDays")
  449. .HasColumnType("int");
  450. b.Property<long>("OrderTypeId")
  451. .HasColumnType("bigint");
  452. b.Property<int>("Period")
  453. .HasColumnType("int");
  454. b.Property<DateTime?>("UpdateDate")
  455. .HasColumnType("datetime2")
  456. .HasColumnOrder(4);
  457. b.Property<string>("UpdateUser")
  458. .HasMaxLength(450)
  459. .HasColumnType("nvarchar(450)")
  460. .HasColumnOrder(2);
  461. b.HasKey("Id");
  462. b.HasIndex("OrderTypeId");
  463. b.ToTable("OrderAllocations");
  464. });
  465. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderType", b =>
  466. {
  467. b.Property<long>("Id")
  468. .ValueGeneratedOnAdd()
  469. .HasColumnType("bigint")
  470. .HasColumnOrder(0);
  471. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  472. b.Property<DateTime>("CreateDate")
  473. .HasColumnType("datetime2")
  474. .HasColumnOrder(3);
  475. b.Property<string>("CreateUser")
  476. .HasMaxLength(450)
  477. .HasColumnType("nvarchar(450)")
  478. .HasColumnOrder(1);
  479. b.Property<int>("DefaultDays")
  480. .HasColumnType("int");
  481. b.Property<string>("NameAr")
  482. .IsRequired()
  483. .HasColumnType("nvarchar(max)");
  484. b.Property<string>("NameEn")
  485. .IsRequired()
  486. .HasColumnType("nvarchar(max)");
  487. b.Property<DateTime?>("UpdateDate")
  488. .HasColumnType("datetime2")
  489. .HasColumnOrder(4);
  490. b.Property<string>("UpdateUser")
  491. .HasMaxLength(450)
  492. .HasColumnType("nvarchar(450)")
  493. .HasColumnOrder(2);
  494. b.HasKey("Id");
  495. b.ToTable("OrderTypes");
  496. b.HasData(
  497. new
  498. {
  499. Id = 1L,
  500. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  501. DefaultDays = 2,
  502. NameAr = "إذن",
  503. NameEn = "Leave"
  504. },
  505. new
  506. {
  507. Id = 2L,
  508. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  509. DefaultDays = 15,
  510. NameAr = "أجازة مرضية",
  511. NameEn = "Sick Leave"
  512. },
  513. new
  514. {
  515. Id = 3L,
  516. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  517. DefaultDays = 20,
  518. NameAr = "وقت إضافي",
  519. NameEn = "Overtime"
  520. },
  521. new
  522. {
  523. Id = 4L,
  524. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  525. DefaultDays = 0,
  526. NameAr = "رحلة عمل",
  527. NameEn = "Business trip"
  528. },
  529. new
  530. {
  531. Id = 5L,
  532. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  533. DefaultDays = 0,
  534. NameAr = "دورة تدريبية",
  535. NameEn = "Course"
  536. });
  537. });
  538. modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
  539. {
  540. b.Property<long>("Id")
  541. .ValueGeneratedOnAdd()
  542. .HasColumnType("bigint")
  543. .HasColumnOrder(0);
  544. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  545. b.Property<string>("CategoryName")
  546. .IsRequired()
  547. .HasMaxLength(150)
  548. .HasColumnType("nvarchar(150)");
  549. b.Property<string>("Desc")
  550. .IsRequired()
  551. .HasMaxLength(250)
  552. .HasColumnType("nvarchar(250)");
  553. b.Property<string>("Name")
  554. .IsRequired()
  555. .HasMaxLength(250)
  556. .HasColumnType("nvarchar(250)");
  557. b.Property<bool>("Show")
  558. .HasColumnType("bit");
  559. b.HasKey("Id");
  560. b.ToTable("Permissions");
  561. });
  562. modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
  563. {
  564. b.Property<long>("Id")
  565. .ValueGeneratedOnAdd()
  566. .HasColumnType("bigint")
  567. .HasColumnOrder(0);
  568. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  569. b.Property<DateTime>("CreateDate")
  570. .HasColumnType("datetime2")
  571. .HasColumnOrder(3);
  572. b.Property<string>("CreateUser")
  573. .HasMaxLength(450)
  574. .HasColumnType("nvarchar(450)")
  575. .HasColumnOrder(1);
  576. b.Property<string>("DeleteUserId")
  577. .HasMaxLength(450)
  578. .HasColumnType("nvarchar(450)")
  579. .HasColumnOrder(8);
  580. b.Property<bool>("IsDeleted")
  581. .HasColumnType("bit")
  582. .HasColumnOrder(7);
  583. b.Property<string>("NameAr")
  584. .IsRequired()
  585. .HasMaxLength(250)
  586. .HasColumnType("nvarchar(250)");
  587. b.Property<string>("NameEn")
  588. .IsRequired()
  589. .HasMaxLength(250)
  590. .HasColumnType("nvarchar(250)");
  591. b.Property<DateTime?>("UpdateDate")
  592. .HasColumnType("datetime2")
  593. .HasColumnOrder(4);
  594. b.Property<string>("UpdateUser")
  595. .HasMaxLength(450)
  596. .HasColumnType("nvarchar(450)")
  597. .HasColumnOrder(2);
  598. b.HasKey("Id");
  599. b.ToTable("Projects");
  600. });
  601. modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
  602. {
  603. b.Property<long>("Id")
  604. .ValueGeneratedOnAdd()
  605. .HasColumnType("bigint")
  606. .HasColumnOrder(0);
  607. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  608. b.Property<string>("Channel")
  609. .HasColumnType("nvarchar(max)");
  610. b.Property<DateTime>("CreateDate")
  611. .HasColumnType("datetime2");
  612. b.Property<string>("CreateUser")
  613. .IsRequired()
  614. .HasColumnType("nvarchar(max)");
  615. b.Property<string>("ErrorCode")
  616. .IsRequired()
  617. .HasColumnType("nvarchar(max)");
  618. b.Property<string>("ErrorDescription")
  619. .IsRequired()
  620. .HasColumnType("nvarchar(max)");
  621. b.Property<string>("InnerException")
  622. .HasColumnType("nvarchar(max)");
  623. b.Property<string>("Input")
  624. .HasColumnType("nvarchar(max)");
  625. b.Property<string>("Method")
  626. .IsRequired()
  627. .HasColumnType("nvarchar(max)");
  628. b.Property<string>("QueryString")
  629. .HasColumnType("nvarchar(max)");
  630. b.Property<string>("ServerIP")
  631. .HasColumnType("nvarchar(max)");
  632. b.Property<string>("ServiceResponseTimeInSeconds")
  633. .IsRequired()
  634. .HasColumnType("nvarchar(max)");
  635. b.Property<string>("UserIP")
  636. .HasColumnType("nvarchar(max)");
  637. b.Property<string>("userAgent")
  638. .HasColumnType("nvarchar(max)");
  639. b.HasKey("Id");
  640. b.ToTable("RoleLogs");
  641. });
  642. modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
  643. {
  644. b.Property<long>("Id")
  645. .ValueGeneratedOnAdd()
  646. .HasColumnType("bigint")
  647. .HasColumnOrder(0);
  648. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  649. b.Property<string>("Channel")
  650. .HasColumnType("nvarchar(max)");
  651. b.Property<DateTime>("CreateDate")
  652. .HasColumnType("datetime2");
  653. b.Property<string>("CreateUser")
  654. .IsRequired()
  655. .HasColumnType("nvarchar(max)");
  656. b.Property<string>("ErrorCode")
  657. .IsRequired()
  658. .HasColumnType("nvarchar(max)");
  659. b.Property<string>("ErrorDescription")
  660. .IsRequired()
  661. .HasColumnType("nvarchar(max)");
  662. b.Property<string>("InnerException")
  663. .HasColumnType("nvarchar(max)");
  664. b.Property<string>("Input")
  665. .HasColumnType("nvarchar(max)");
  666. b.Property<string>("Method")
  667. .IsRequired()
  668. .HasColumnType("nvarchar(max)");
  669. b.Property<string>("QueryString")
  670. .HasColumnType("nvarchar(max)");
  671. b.Property<string>("ServerIP")
  672. .HasColumnType("nvarchar(max)");
  673. b.Property<string>("ServiceResponseTimeInSeconds")
  674. .IsRequired()
  675. .HasColumnType("nvarchar(max)");
  676. b.Property<string>("UserIP")
  677. .HasColumnType("nvarchar(max)");
  678. b.Property<string>("userAgent")
  679. .HasColumnType("nvarchar(max)");
  680. b.HasKey("Id");
  681. b.ToTable("SettingLogs");
  682. });
  683. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  684. {
  685. b.Property<long>("Id")
  686. .ValueGeneratedOnAdd()
  687. .HasColumnType("bigint")
  688. .HasColumnOrder(0);
  689. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  690. b.Property<DateTime>("CreateDate")
  691. .HasColumnType("datetime2")
  692. .HasColumnOrder(3);
  693. b.Property<string>("CreateUser")
  694. .HasMaxLength(450)
  695. .HasColumnType("nvarchar(450)")
  696. .HasColumnOrder(1);
  697. b.Property<string>("DeleteUserId")
  698. .HasMaxLength(450)
  699. .HasColumnType("nvarchar(450)")
  700. .HasColumnOrder(8);
  701. b.Property<bool>("IsDeleted")
  702. .HasColumnType("bit")
  703. .HasColumnOrder(7);
  704. b.Property<string>("NameAr")
  705. .IsRequired()
  706. .HasMaxLength(250)
  707. .HasColumnType("nvarchar(250)");
  708. b.Property<string>("NameEn")
  709. .IsRequired()
  710. .HasMaxLength(250)
  711. .HasColumnType("nvarchar(250)");
  712. b.Property<DateTime?>("UpdateDate")
  713. .HasColumnType("datetime2")
  714. .HasColumnOrder(4);
  715. b.Property<string>("UpdateUser")
  716. .HasMaxLength(450)
  717. .HasColumnType("nvarchar(450)")
  718. .HasColumnOrder(2);
  719. b.HasKey("Id");
  720. b.ToTable("Teams");
  721. });
  722. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamLog", b =>
  723. {
  724. b.Property<long>("Id")
  725. .ValueGeneratedOnAdd()
  726. .HasColumnType("bigint")
  727. .HasColumnOrder(0);
  728. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  729. b.Property<string>("Channel")
  730. .HasColumnType("nvarchar(max)");
  731. b.Property<DateTime>("CreateDate")
  732. .HasColumnType("datetime2");
  733. b.Property<string>("CreateUser")
  734. .IsRequired()
  735. .HasColumnType("nvarchar(max)");
  736. b.Property<string>("ErrorCode")
  737. .IsRequired()
  738. .HasColumnType("nvarchar(max)");
  739. b.Property<string>("ErrorDescription")
  740. .IsRequired()
  741. .HasColumnType("nvarchar(max)");
  742. b.Property<string>("InnerException")
  743. .HasColumnType("nvarchar(max)");
  744. b.Property<string>("Input")
  745. .HasColumnType("nvarchar(max)");
  746. b.Property<string>("Method")
  747. .IsRequired()
  748. .HasColumnType("nvarchar(max)");
  749. b.Property<string>("QueryString")
  750. .HasColumnType("nvarchar(max)");
  751. b.Property<string>("ServerIP")
  752. .HasColumnType("nvarchar(max)");
  753. b.Property<string>("ServiceResponseTimeInSeconds")
  754. .IsRequired()
  755. .HasColumnType("nvarchar(max)");
  756. b.Property<string>("UserIP")
  757. .HasColumnType("nvarchar(max)");
  758. b.Property<string>("userAgent")
  759. .HasColumnType("nvarchar(max)");
  760. b.HasKey("Id");
  761. b.ToTable("TeamLogs");
  762. });
  763. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  764. {
  765. b.Property<long>("Id")
  766. .ValueGeneratedOnAdd()
  767. .HasColumnType("bigint")
  768. .HasColumnOrder(0);
  769. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  770. b.Property<string>("AssignedUserId")
  771. .IsRequired()
  772. .HasColumnType("nvarchar(max)");
  773. b.Property<DateTime>("CreateDate")
  774. .HasColumnType("datetime2")
  775. .HasColumnOrder(3);
  776. b.Property<string>("CreateUser")
  777. .HasMaxLength(450)
  778. .HasColumnType("nvarchar(450)")
  779. .HasColumnOrder(1);
  780. b.Property<bool>("IsAdmin")
  781. .HasColumnType("bit");
  782. b.Property<long>("TeamId")
  783. .HasColumnType("bigint");
  784. b.Property<DateTime?>("UpdateDate")
  785. .HasColumnType("datetime2")
  786. .HasColumnOrder(4);
  787. b.Property<string>("UpdateUser")
  788. .HasMaxLength(450)
  789. .HasColumnType("nvarchar(450)")
  790. .HasColumnOrder(2);
  791. b.HasKey("Id");
  792. b.HasIndex("TeamId");
  793. b.ToTable("TeamUser");
  794. });
  795. modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
  796. {
  797. b.Property<long>("Id")
  798. .ValueGeneratedOnAdd()
  799. .HasColumnType("bigint")
  800. .HasColumnOrder(0);
  801. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  802. b.Property<int?>("CityId")
  803. .HasColumnType("int");
  804. b.Property<int?>("CountryId")
  805. .HasColumnType("int");
  806. b.Property<DateTime>("CreateDate")
  807. .HasColumnType("datetime2")
  808. .HasColumnOrder(3);
  809. b.Property<string>("CreateUser")
  810. .HasMaxLength(450)
  811. .HasColumnType("nvarchar(450)")
  812. .HasColumnOrder(1);
  813. b.Property<string>("DeleteUserId")
  814. .HasMaxLength(450)
  815. .HasColumnType("nvarchar(450)")
  816. .HasColumnOrder(8);
  817. b.Property<DateTime?>("EndDate")
  818. .HasColumnType("datetime2");
  819. b.Property<bool>("IsDeleted")
  820. .HasColumnType("bit")
  821. .HasColumnOrder(7);
  822. b.Property<long?>("LeaveTypeId")
  823. .HasColumnType("bigint");
  824. b.Property<int?>("OrderStatus")
  825. .HasColumnType("int");
  826. b.Property<long>("OrderTypeId")
  827. .HasColumnType("bigint");
  828. b.Property<string>("RequestComments")
  829. .HasColumnType("nvarchar(max)");
  830. b.Property<string>("RequestingEmployeeId")
  831. .IsRequired()
  832. .HasColumnType("nvarchar(max)");
  833. b.Property<DateTime>("StartDate")
  834. .HasColumnType("datetime2");
  835. b.Property<DateTime?>("UpdateDate")
  836. .HasColumnType("datetime2")
  837. .HasColumnOrder(4);
  838. b.Property<string>("UpdateUser")
  839. .HasMaxLength(450)
  840. .HasColumnType("nvarchar(450)")
  841. .HasColumnOrder(2);
  842. b.HasKey("Id");
  843. b.HasIndex("LeaveTypeId");
  844. b.HasIndex("OrderTypeId");
  845. b.ToTable("OrderRequests");
  846. });
  847. modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
  848. {
  849. b.Property<long>("Id")
  850. .ValueGeneratedOnAdd()
  851. .HasColumnType("bigint")
  852. .HasColumnOrder(0);
  853. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  854. b.Property<string>("Channel")
  855. .HasColumnType("nvarchar(max)");
  856. b.Property<DateTime>("CreateDate")
  857. .HasColumnType("datetime2");
  858. b.Property<string>("CreateUser")
  859. .IsRequired()
  860. .HasColumnType("nvarchar(max)");
  861. b.Property<string>("ErrorCode")
  862. .IsRequired()
  863. .HasColumnType("nvarchar(max)");
  864. b.Property<string>("ErrorDescription")
  865. .IsRequired()
  866. .HasColumnType("nvarchar(max)");
  867. b.Property<string>("InnerException")
  868. .HasColumnType("nvarchar(max)");
  869. b.Property<string>("Input")
  870. .HasColumnType("nvarchar(max)");
  871. b.Property<string>("Method")
  872. .IsRequired()
  873. .HasColumnType("nvarchar(max)");
  874. b.Property<string>("QueryString")
  875. .HasColumnType("nvarchar(max)");
  876. b.Property<string>("ServerIP")
  877. .HasColumnType("nvarchar(max)");
  878. b.Property<string>("ServiceResponseTimeInSeconds")
  879. .IsRequired()
  880. .HasColumnType("nvarchar(max)");
  881. b.Property<string>("UserIP")
  882. .HasColumnType("nvarchar(max)");
  883. b.Property<string>("userAgent")
  884. .HasColumnType("nvarchar(max)");
  885. b.HasKey("Id");
  886. b.ToTable("UserLogs");
  887. });
  888. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  889. {
  890. b.Property<long>("Id")
  891. .ValueGeneratedOnAdd()
  892. .HasColumnType("bigint")
  893. .HasColumnOrder(0);
  894. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  895. b.Property<long>("AssignedUserId")
  896. .HasColumnType("bigint");
  897. b.Property<DateTime>("CreateDate")
  898. .HasColumnType("datetime2")
  899. .HasColumnOrder(3);
  900. b.Property<string>("CreateUser")
  901. .HasMaxLength(450)
  902. .HasColumnType("nvarchar(450)")
  903. .HasColumnOrder(1);
  904. b.Property<string>("DeleteUserId")
  905. .HasMaxLength(450)
  906. .HasColumnType("nvarchar(450)")
  907. .HasColumnOrder(8);
  908. b.Property<string>("Description")
  909. .IsRequired()
  910. .HasColumnType("nvarchar(max)");
  911. b.Property<DateTime>("DueDate")
  912. .HasColumnType("datetime2");
  913. b.Property<bool>("IsDeleted")
  914. .HasColumnType("bit")
  915. .HasColumnOrder(7);
  916. b.Property<int>("Priority")
  917. .HasColumnType("int");
  918. b.Property<long>("ProjectId")
  919. .HasColumnType("bigint");
  920. b.Property<long>("StatusId")
  921. .HasColumnType("bigint");
  922. b.Property<string>("Title")
  923. .IsRequired()
  924. .HasColumnType("nvarchar(max)");
  925. b.Property<DateTime?>("UpdateDate")
  926. .HasColumnType("datetime2")
  927. .HasColumnOrder(4);
  928. b.Property<string>("UpdateUser")
  929. .HasMaxLength(450)
  930. .HasColumnType("nvarchar(450)")
  931. .HasColumnOrder(2);
  932. b.HasKey("Id");
  933. b.HasIndex("ProjectId");
  934. b.HasIndex("StatusId");
  935. b.ToTable("UserTasks");
  936. });
  937. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  938. {
  939. b.Property<long>("Id")
  940. .ValueGeneratedOnAdd()
  941. .HasColumnType("bigint")
  942. .HasColumnOrder(0);
  943. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  944. b.Property<long>("AttachmentTypeId")
  945. .HasColumnType("bigint");
  946. b.Property<DateTime>("CreateDate")
  947. .HasColumnType("datetime2")
  948. .HasColumnOrder(3);
  949. b.Property<string>("CreateUser")
  950. .HasMaxLength(450)
  951. .HasColumnType("nvarchar(450)")
  952. .HasColumnOrder(1);
  953. b.Property<string>("FileName")
  954. .HasMaxLength(250)
  955. .HasColumnType("nvarchar(250)");
  956. b.Property<string>("OriginalName")
  957. .IsRequired()
  958. .HasMaxLength(250)
  959. .HasColumnType("nvarchar(250)");
  960. b.Property<long>("TaskId")
  961. .HasColumnType("bigint");
  962. b.Property<DateTime?>("UpdateDate")
  963. .HasColumnType("datetime2")
  964. .HasColumnOrder(4);
  965. b.Property<string>("UpdateUser")
  966. .HasMaxLength(450)
  967. .HasColumnType("nvarchar(450)")
  968. .HasColumnOrder(2);
  969. b.HasKey("Id");
  970. b.HasIndex("AttachmentTypeId");
  971. b.HasIndex("TaskId");
  972. b.ToTable("UserTaskAttachments");
  973. });
  974. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  975. {
  976. b.Property<long>("Id")
  977. .ValueGeneratedOnAdd()
  978. .HasColumnType("bigint")
  979. .HasColumnOrder(0);
  980. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  981. b.Property<long>("AssignedToUserId")
  982. .HasColumnType("bigint");
  983. b.Property<string>("Comment")
  984. .HasMaxLength(500)
  985. .HasColumnType("nvarchar(500)");
  986. b.Property<DateTime>("CreateDate")
  987. .HasColumnType("datetime2")
  988. .HasColumnOrder(3);
  989. b.Property<string>("CreateUser")
  990. .HasMaxLength(450)
  991. .HasColumnType("nvarchar(450)")
  992. .HasColumnOrder(1);
  993. b.Property<long>("CurrentStatusId")
  994. .HasColumnType("bigint");
  995. b.Property<bool>("IsDeleted")
  996. .HasColumnType("bit");
  997. b.Property<long>("TaskId")
  998. .HasColumnType("bigint");
  999. b.Property<DateTime?>("UpdateDate")
  1000. .HasColumnType("datetime2")
  1001. .HasColumnOrder(4);
  1002. b.Property<string>("UpdateUser")
  1003. .HasMaxLength(450)
  1004. .HasColumnType("nvarchar(450)")
  1005. .HasColumnOrder(2);
  1006. b.Property<long?>("UserTaskId")
  1007. .HasColumnType("bigint");
  1008. b.HasKey("Id");
  1009. b.HasIndex("CurrentStatusId");
  1010. b.HasIndex("UserTaskId");
  1011. b.ToTable("UserTaskHistories");
  1012. });
  1013. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskLog", b =>
  1014. {
  1015. b.Property<long>("Id")
  1016. .ValueGeneratedOnAdd()
  1017. .HasColumnType("bigint")
  1018. .HasColumnOrder(0);
  1019. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1020. b.Property<string>("Channel")
  1021. .HasColumnType("nvarchar(max)");
  1022. b.Property<DateTime>("CreateDate")
  1023. .HasColumnType("datetime2");
  1024. b.Property<string>("CreateUser")
  1025. .IsRequired()
  1026. .HasColumnType("nvarchar(max)");
  1027. b.Property<string>("ErrorCode")
  1028. .IsRequired()
  1029. .HasColumnType("nvarchar(max)");
  1030. b.Property<string>("ErrorDescription")
  1031. .IsRequired()
  1032. .HasColumnType("nvarchar(max)");
  1033. b.Property<string>("InnerException")
  1034. .HasColumnType("nvarchar(max)");
  1035. b.Property<string>("Input")
  1036. .HasColumnType("nvarchar(max)");
  1037. b.Property<string>("Method")
  1038. .IsRequired()
  1039. .HasColumnType("nvarchar(max)");
  1040. b.Property<string>("QueryString")
  1041. .HasColumnType("nvarchar(max)");
  1042. b.Property<string>("ServerIP")
  1043. .HasColumnType("nvarchar(max)");
  1044. b.Property<string>("ServiceResponseTimeInSeconds")
  1045. .IsRequired()
  1046. .HasColumnType("nvarchar(max)");
  1047. b.Property<string>("UserIP")
  1048. .HasColumnType("nvarchar(max)");
  1049. b.Property<string>("userAgent")
  1050. .HasColumnType("nvarchar(max)");
  1051. b.HasKey("Id");
  1052. b.ToTable("UserTaskLogs");
  1053. });
  1054. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
  1055. {
  1056. b.Property<long>("Id")
  1057. .ValueGeneratedOnAdd()
  1058. .HasColumnType("bigint")
  1059. .HasColumnOrder(0);
  1060. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1061. b.Property<string>("NameAr")
  1062. .IsRequired()
  1063. .HasMaxLength(250)
  1064. .HasColumnType("nvarchar(250)");
  1065. b.Property<string>("NameEn")
  1066. .IsRequired()
  1067. .HasMaxLength(250)
  1068. .HasColumnType("nvarchar(250)");
  1069. b.HasKey("Id");
  1070. b.ToTable("UserTaskStatuses");
  1071. b.HasData(
  1072. new
  1073. {
  1074. Id = 1L,
  1075. NameAr = "جديدة",
  1076. NameEn = "New"
  1077. },
  1078. new
  1079. {
  1080. Id = 2L,
  1081. NameAr = "قيد العمل",
  1082. NameEn = "Under progress"
  1083. },
  1084. new
  1085. {
  1086. Id = 3L,
  1087. NameAr = "أغلقت",
  1088. NameEn = "Closed"
  1089. },
  1090. new
  1091. {
  1092. Id = 4L,
  1093. NameAr = "تمت",
  1094. NameEn = "Completed"
  1095. },
  1096. new
  1097. {
  1098. Id = 5L,
  1099. NameAr = "مؤجلة",
  1100. NameEn = "Delayed"
  1101. });
  1102. });
  1103. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  1104. {
  1105. b.Property<string>("Id")
  1106. .HasColumnType("nvarchar(450)");
  1107. b.Property<string>("ConcurrencyStamp")
  1108. .IsConcurrencyToken()
  1109. .HasColumnType("nvarchar(max)");
  1110. b.Property<DateTime>("CreateDate")
  1111. .HasColumnType("datetime2");
  1112. b.Property<string>("CreateUser")
  1113. .HasColumnType("nvarchar(max)");
  1114. b.Property<string>("DeleteUserId")
  1115. .HasColumnType("nvarchar(max)");
  1116. b.Property<bool?>("IsAdmin")
  1117. .HasColumnType("bit");
  1118. b.Property<bool>("IsDeleted")
  1119. .HasColumnType("bit");
  1120. b.Property<string>("Name")
  1121. .HasMaxLength(256)
  1122. .HasColumnType("nvarchar(256)");
  1123. b.Property<string>("NormalizedName")
  1124. .HasMaxLength(256)
  1125. .HasColumnType("nvarchar(256)");
  1126. b.Property<DateTime?>("UpdateDate")
  1127. .HasColumnType("datetime2");
  1128. b.Property<string>("UpdateUser")
  1129. .HasColumnType("nvarchar(max)");
  1130. b.HasKey("Id");
  1131. b.HasIndex("NormalizedName")
  1132. .IsUnique()
  1133. .HasDatabaseName("RoleNameIndex")
  1134. .HasFilter("[NormalizedName] IS NOT NULL");
  1135. b.ToTable("AspNetRoles", (string)null);
  1136. b.HasData(
  1137. new
  1138. {
  1139. Id = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A",
  1140. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  1141. IsAdmin = true,
  1142. IsDeleted = false,
  1143. Name = "Admin",
  1144. NormalizedName = "ADMIN"
  1145. },
  1146. new
  1147. {
  1148. Id = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E",
  1149. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  1150. IsAdmin = false,
  1151. IsDeleted = false,
  1152. Name = "Employee",
  1153. NormalizedName = "EMPLOYEE"
  1154. });
  1155. });
  1156. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  1157. {
  1158. b.Property<string>("Id")
  1159. .HasColumnType("nvarchar(450)");
  1160. b.Property<int>("AccessFailedCount")
  1161. .HasColumnType("int");
  1162. b.Property<string>("ConcurrencyStamp")
  1163. .IsConcurrencyToken()
  1164. .HasColumnType("nvarchar(max)");
  1165. b.Property<string>("CreateUser")
  1166. .HasColumnType("nvarchar(max)");
  1167. b.Property<string>("DeleteUserId")
  1168. .HasColumnType("nvarchar(max)");
  1169. b.Property<string>("Email")
  1170. .HasMaxLength(256)
  1171. .HasColumnType("nvarchar(256)");
  1172. b.Property<bool>("EmailConfirmed")
  1173. .HasColumnType("bit");
  1174. b.Property<string>("FavoriteName")
  1175. .HasColumnType("nvarchar(max)");
  1176. b.Property<string>("FirstName")
  1177. .IsRequired()
  1178. .HasColumnType("nvarchar(max)");
  1179. b.Property<decimal?>("IncomeTaxValue")
  1180. .HasColumnType("decimal(18,2)");
  1181. b.Property<bool>("IsDeleted")
  1182. .HasColumnType("bit");
  1183. b.Property<bool>("IsStopped")
  1184. .HasColumnType("bit");
  1185. b.Property<string>("JobTitle")
  1186. .HasColumnType("nvarchar(max)");
  1187. b.Property<string>("LastName")
  1188. .IsRequired()
  1189. .HasColumnType("nvarchar(max)");
  1190. b.Property<bool>("LockoutEnabled")
  1191. .HasColumnType("bit");
  1192. b.Property<DateTimeOffset?>("LockoutEnd")
  1193. .HasColumnType("datetimeoffset");
  1194. b.Property<string>("ManagerId")
  1195. .HasColumnType("nvarchar(450)");
  1196. b.Property<string>("NormalizedEmail")
  1197. .HasMaxLength(256)
  1198. .HasColumnType("nvarchar(256)");
  1199. b.Property<string>("NormalizedUserName")
  1200. .HasMaxLength(256)
  1201. .HasColumnType("nvarchar(256)");
  1202. b.Property<string>("PassportNumber")
  1203. .IsRequired()
  1204. .HasColumnType("nvarchar(max)");
  1205. b.Property<string>("PasswordHash")
  1206. .HasColumnType("nvarchar(max)");
  1207. b.Property<string>("PhoneNumber")
  1208. .HasColumnType("nvarchar(max)");
  1209. b.Property<bool>("PhoneNumberConfirmed")
  1210. .HasColumnType("bit");
  1211. b.Property<int?>("QualificationId")
  1212. .HasColumnType("int");
  1213. b.Property<string>("SecurityStamp")
  1214. .HasColumnType("nvarchar(max)");
  1215. b.Property<decimal?>("TaxNumber")
  1216. .HasColumnType("decimal(18,2)");
  1217. b.Property<bool>("TwoFactorEnabled")
  1218. .HasColumnType("bit");
  1219. b.Property<string>("University")
  1220. .HasColumnType("nvarchar(max)");
  1221. b.Property<string>("UpdateUser")
  1222. .HasColumnType("nvarchar(max)");
  1223. b.Property<string>("UserName")
  1224. .HasMaxLength(256)
  1225. .HasColumnType("nvarchar(256)");
  1226. b.Property<int>("UserType")
  1227. .HasColumnType("int");
  1228. b.HasKey("Id");
  1229. b.HasIndex("ManagerId");
  1230. b.HasIndex("NormalizedEmail")
  1231. .HasDatabaseName("EmailIndex");
  1232. b.HasIndex("NormalizedUserName")
  1233. .IsUnique()
  1234. .HasDatabaseName("UserNameIndex")
  1235. .HasFilter("[NormalizedUserName] IS NOT NULL");
  1236. b.ToTable("AspNetUsers", (string)null);
  1237. b.HasData(
  1238. new
  1239. {
  1240. Id = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  1241. AccessFailedCount = 0,
  1242. ConcurrencyStamp = "7cc87689-9eab-4280-b8e3-1834080783a5",
  1243. Email = "a@b.com",
  1244. EmailConfirmed = true,
  1245. FirstName = "Zinab",
  1246. IncomeTaxValue = 1m,
  1247. IsDeleted = false,
  1248. IsStopped = false,
  1249. LastName = "Elgendy",
  1250. LockoutEnabled = false,
  1251. NormalizedEmail = "A@B.COM",
  1252. NormalizedUserName = "ADMIN",
  1253. PassportNumber = "1234567",
  1254. PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
  1255. PhoneNumber = "1234567890",
  1256. PhoneNumberConfirmed = true,
  1257. QualificationId = 1,
  1258. SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
  1259. TaxNumber = 111m,
  1260. TwoFactorEnabled = false,
  1261. UserName = "Admin",
  1262. UserType = 1
  1263. },
  1264. new
  1265. {
  1266. Id = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  1267. AccessFailedCount = 0,
  1268. ConcurrencyStamp = "4af7b4cf-802a-455b-b598-997e167745b3",
  1269. Email = "ali@b.com",
  1270. EmailConfirmed = true,
  1271. FirstName = "Ali",
  1272. IncomeTaxValue = 100m,
  1273. IsDeleted = false,
  1274. IsStopped = false,
  1275. LastName = "Farok",
  1276. LockoutEnabled = false,
  1277. NormalizedEmail = "ALI@B.COM",
  1278. NormalizedUserName = "ALI",
  1279. PassportNumber = "7654321001010",
  1280. PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
  1281. PhoneNumber = "1234567890",
  1282. PhoneNumberConfirmed = true,
  1283. QualificationId = 1,
  1284. SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
  1285. TaxNumber = 222m,
  1286. TwoFactorEnabled = false,
  1287. UserName = "ali",
  1288. UserType = 1
  1289. });
  1290. });
  1291. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  1292. {
  1293. b.Property<long>("Id")
  1294. .ValueGeneratedOnAdd()
  1295. .HasColumnType("bigint")
  1296. .HasColumnOrder(0);
  1297. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1298. b.Property<long>("PermissionId")
  1299. .HasColumnType("bigint");
  1300. b.Property<string>("PermissionName")
  1301. .IsRequired()
  1302. .HasColumnType("nvarchar(max)");
  1303. b.Property<string>("RoleId")
  1304. .IsRequired()
  1305. .HasColumnType("nvarchar(450)");
  1306. b.HasKey("Id");
  1307. b.HasIndex("PermissionId");
  1308. b.HasIndex("RoleId");
  1309. b.ToTable("RolePermissions");
  1310. });
  1311. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  1312. {
  1313. b.Property<long>("Id")
  1314. .ValueGeneratedOnAdd()
  1315. .HasColumnType("bigint")
  1316. .HasColumnOrder(0);
  1317. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1318. b.Property<string>("AddressDesc")
  1319. .IsRequired()
  1320. .HasColumnType("nvarchar(max)");
  1321. b.Property<string>("City")
  1322. .IsRequired()
  1323. .HasColumnType("nvarchar(max)");
  1324. b.Property<int>("CountryId")
  1325. .HasColumnType("int");
  1326. b.Property<DateTime>("CreateDate")
  1327. .HasColumnType("datetime2")
  1328. .HasColumnOrder(3);
  1329. b.Property<string>("CreateUser")
  1330. .HasMaxLength(450)
  1331. .HasColumnType("nvarchar(450)")
  1332. .HasColumnOrder(1);
  1333. b.Property<string>("PostalCode")
  1334. .IsRequired()
  1335. .HasColumnType("nvarchar(max)");
  1336. b.Property<DateTime?>("UpdateDate")
  1337. .HasColumnType("datetime2")
  1338. .HasColumnOrder(4);
  1339. b.Property<string>("UpdateUser")
  1340. .HasMaxLength(450)
  1341. .HasColumnType("nvarchar(450)")
  1342. .HasColumnOrder(2);
  1343. b.Property<string>("UserId")
  1344. .IsRequired()
  1345. .HasColumnType("nvarchar(450)");
  1346. b.HasKey("Id");
  1347. b.HasIndex("UserId")
  1348. .IsUnique();
  1349. b.ToTable("UserAddress");
  1350. });
  1351. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  1352. {
  1353. b.Property<long>("Id")
  1354. .ValueGeneratedOnAdd()
  1355. .HasColumnType("bigint")
  1356. .HasColumnOrder(0);
  1357. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1358. b.Property<long>("AttachmentTypeId")
  1359. .HasColumnType("bigint");
  1360. b.Property<DateTime>("CreateDate")
  1361. .HasColumnType("datetime2")
  1362. .HasColumnOrder(3);
  1363. b.Property<string>("CreateUser")
  1364. .HasMaxLength(450)
  1365. .HasColumnType("nvarchar(450)")
  1366. .HasColumnOrder(1);
  1367. b.Property<string>("FileName")
  1368. .IsRequired()
  1369. .HasMaxLength(250)
  1370. .HasColumnType("nvarchar(250)");
  1371. b.Property<string>("OriginalName")
  1372. .IsRequired()
  1373. .HasMaxLength(250)
  1374. .HasColumnType("nvarchar(250)");
  1375. b.Property<DateTime?>("UpdateDate")
  1376. .HasColumnType("datetime2")
  1377. .HasColumnOrder(4);
  1378. b.Property<string>("UpdateUser")
  1379. .HasMaxLength(450)
  1380. .HasColumnType("nvarchar(450)")
  1381. .HasColumnOrder(2);
  1382. b.Property<string>("UserId")
  1383. .IsRequired()
  1384. .HasColumnType("nvarchar(450)");
  1385. b.HasKey("Id");
  1386. b.HasIndex("AttachmentTypeId");
  1387. b.HasIndex("UserId");
  1388. b.ToTable("UserAttachments");
  1389. });
  1390. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  1391. {
  1392. b.Property<int>("Id")
  1393. .ValueGeneratedOnAdd()
  1394. .HasColumnType("int");
  1395. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  1396. b.Property<string>("ClaimType")
  1397. .HasColumnType("nvarchar(max)");
  1398. b.Property<string>("ClaimValue")
  1399. .HasColumnType("nvarchar(max)");
  1400. b.Property<string>("RoleId")
  1401. .IsRequired()
  1402. .HasColumnType("nvarchar(450)");
  1403. b.HasKey("Id");
  1404. b.HasIndex("RoleId");
  1405. b.ToTable("AspNetRoleClaims", (string)null);
  1406. });
  1407. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  1408. {
  1409. b.Property<int>("Id")
  1410. .ValueGeneratedOnAdd()
  1411. .HasColumnType("int");
  1412. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  1413. b.Property<string>("ClaimType")
  1414. .HasColumnType("nvarchar(max)");
  1415. b.Property<string>("ClaimValue")
  1416. .HasColumnType("nvarchar(max)");
  1417. b.Property<string>("UserId")
  1418. .IsRequired()
  1419. .HasColumnType("nvarchar(450)");
  1420. b.HasKey("Id");
  1421. b.HasIndex("UserId");
  1422. b.ToTable("AspNetUserClaims", (string)null);
  1423. });
  1424. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  1425. {
  1426. b.Property<string>("LoginProvider")
  1427. .HasColumnType("nvarchar(450)");
  1428. b.Property<string>("ProviderKey")
  1429. .HasColumnType("nvarchar(450)");
  1430. b.Property<string>("ProviderDisplayName")
  1431. .HasColumnType("nvarchar(max)");
  1432. b.Property<string>("UserId")
  1433. .IsRequired()
  1434. .HasColumnType("nvarchar(450)");
  1435. b.HasKey("LoginProvider", "ProviderKey");
  1436. b.HasIndex("UserId");
  1437. b.ToTable("AspNetUserLogins", (string)null);
  1438. });
  1439. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  1440. {
  1441. b.Property<string>("UserId")
  1442. .HasColumnType("nvarchar(450)");
  1443. b.Property<string>("RoleId")
  1444. .HasColumnType("nvarchar(450)");
  1445. b.HasKey("UserId", "RoleId");
  1446. b.HasIndex("RoleId");
  1447. b.ToTable("AspNetUserRoles", (string)null);
  1448. b.HasData(
  1449. new
  1450. {
  1451. UserId = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  1452. RoleId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A"
  1453. },
  1454. new
  1455. {
  1456. UserId = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  1457. RoleId = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E"
  1458. });
  1459. });
  1460. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  1461. {
  1462. b.Property<string>("UserId")
  1463. .HasColumnType("nvarchar(450)");
  1464. b.Property<string>("LoginProvider")
  1465. .HasColumnType("nvarchar(450)");
  1466. b.Property<string>("Name")
  1467. .HasColumnType("nvarchar(450)");
  1468. b.Property<string>("Value")
  1469. .HasColumnType("nvarchar(max)");
  1470. b.HasKey("UserId", "LoginProvider", "Name");
  1471. b.ToTable("AspNetUserTokens", (string)null);
  1472. });
  1473. modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
  1474. {
  1475. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1476. .WithMany()
  1477. .HasForeignKey("UserRolesId")
  1478. .OnDelete(DeleteBehavior.Cascade)
  1479. .IsRequired();
  1480. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1481. .WithMany()
  1482. .HasForeignKey("UsersId")
  1483. .OnDelete(DeleteBehavior.Cascade)
  1484. .IsRequired();
  1485. });
  1486. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  1487. {
  1488. b.HasOne("MTWorkHR.Core.Entities.Meeting", "Meeting")
  1489. .WithMany("MeetingUsers")
  1490. .HasForeignKey("MeetingId")
  1491. .OnDelete(DeleteBehavior.Cascade)
  1492. .IsRequired();
  1493. b.Navigation("Meeting");
  1494. });
  1495. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAllocation", b =>
  1496. {
  1497. b.HasOne("MTWorkHR.Core.Entities.OrderType", "OrderType")
  1498. .WithMany()
  1499. .HasForeignKey("OrderTypeId")
  1500. .OnDelete(DeleteBehavior.Cascade)
  1501. .IsRequired();
  1502. b.Navigation("OrderType");
  1503. });
  1504. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  1505. {
  1506. b.HasOne("MTWorkHR.Core.Entities.Team", "Team")
  1507. .WithMany("TeamUsers")
  1508. .HasForeignKey("TeamId")
  1509. .OnDelete(DeleteBehavior.Cascade)
  1510. .IsRequired();
  1511. b.Navigation("Team");
  1512. });
  1513. modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
  1514. {
  1515. b.HasOne("MTWorkHR.Core.Entities.LeaveType", "LeaveType")
  1516. .WithMany()
  1517. .HasForeignKey("LeaveTypeId");
  1518. b.HasOne("MTWorkHR.Core.Entities.OrderType", "OrderType")
  1519. .WithMany()
  1520. .HasForeignKey("OrderTypeId")
  1521. .OnDelete(DeleteBehavior.Cascade)
  1522. .IsRequired();
  1523. b.Navigation("LeaveType");
  1524. b.Navigation("OrderType");
  1525. });
  1526. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  1527. {
  1528. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  1529. .WithMany()
  1530. .HasForeignKey("ProjectId")
  1531. .OnDelete(DeleteBehavior.Cascade)
  1532. .IsRequired();
  1533. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  1534. .WithMany()
  1535. .HasForeignKey("StatusId")
  1536. .OnDelete(DeleteBehavior.Cascade)
  1537. .IsRequired();
  1538. b.Navigation("Project");
  1539. b.Navigation("TaskStatus");
  1540. });
  1541. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  1542. {
  1543. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  1544. .WithMany()
  1545. .HasForeignKey("AttachmentTypeId")
  1546. .OnDelete(DeleteBehavior.Cascade)
  1547. .IsRequired();
  1548. b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
  1549. .WithMany("TaskAttachments")
  1550. .HasForeignKey("TaskId")
  1551. .OnDelete(DeleteBehavior.Cascade)
  1552. .IsRequired();
  1553. b.Navigation("AttachmentType");
  1554. b.Navigation("UserTask");
  1555. });
  1556. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  1557. {
  1558. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  1559. .WithMany()
  1560. .HasForeignKey("CurrentStatusId")
  1561. .OnDelete(DeleteBehavior.Cascade)
  1562. .IsRequired();
  1563. b.HasOne("MTWorkHR.Core.Entities.UserTask", null)
  1564. .WithMany("UserTaskHistories")
  1565. .HasForeignKey("UserTaskId");
  1566. b.Navigation("TaskStatus");
  1567. });
  1568. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  1569. {
  1570. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "Manager")
  1571. .WithMany()
  1572. .HasForeignKey("ManagerId");
  1573. b.Navigation("Manager");
  1574. });
  1575. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  1576. {
  1577. b.HasOne("MTWorkHR.Core.Entities.Permission", "Permission")
  1578. .WithMany()
  1579. .HasForeignKey("PermissionId")
  1580. .OnDelete(DeleteBehavior.Cascade)
  1581. .IsRequired();
  1582. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", "Role")
  1583. .WithMany("RolePermissions")
  1584. .HasForeignKey("RoleId")
  1585. .OnDelete(DeleteBehavior.Cascade)
  1586. .IsRequired();
  1587. b.Navigation("Permission");
  1588. b.Navigation("Role");
  1589. });
  1590. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  1591. {
  1592. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  1593. .WithOne("UserAddress")
  1594. .HasForeignKey("MTWorkHR.Infrastructure.Entities.UserAddress", "UserId")
  1595. .OnDelete(DeleteBehavior.Cascade)
  1596. .IsRequired();
  1597. b.Navigation("User");
  1598. });
  1599. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  1600. {
  1601. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  1602. .WithMany()
  1603. .HasForeignKey("AttachmentTypeId")
  1604. .OnDelete(DeleteBehavior.Cascade)
  1605. .IsRequired();
  1606. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  1607. .WithMany("UserAttachments")
  1608. .HasForeignKey("UserId")
  1609. .OnDelete(DeleteBehavior.Cascade)
  1610. .IsRequired();
  1611. b.Navigation("AttachmentType");
  1612. b.Navigation("User");
  1613. });
  1614. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  1615. {
  1616. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1617. .WithMany()
  1618. .HasForeignKey("RoleId")
  1619. .OnDelete(DeleteBehavior.Cascade)
  1620. .IsRequired();
  1621. });
  1622. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  1623. {
  1624. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1625. .WithMany()
  1626. .HasForeignKey("UserId")
  1627. .OnDelete(DeleteBehavior.Cascade)
  1628. .IsRequired();
  1629. });
  1630. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  1631. {
  1632. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1633. .WithMany()
  1634. .HasForeignKey("UserId")
  1635. .OnDelete(DeleteBehavior.Cascade)
  1636. .IsRequired();
  1637. });
  1638. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  1639. {
  1640. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1641. .WithMany()
  1642. .HasForeignKey("RoleId")
  1643. .OnDelete(DeleteBehavior.Cascade)
  1644. .IsRequired();
  1645. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1646. .WithMany()
  1647. .HasForeignKey("UserId")
  1648. .OnDelete(DeleteBehavior.Cascade)
  1649. .IsRequired();
  1650. });
  1651. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  1652. {
  1653. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1654. .WithMany()
  1655. .HasForeignKey("UserId")
  1656. .OnDelete(DeleteBehavior.Cascade)
  1657. .IsRequired();
  1658. });
  1659. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  1660. {
  1661. b.Navigation("MeetingUsers");
  1662. });
  1663. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  1664. {
  1665. b.Navigation("TeamUsers");
  1666. });
  1667. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  1668. {
  1669. b.Navigation("TaskAttachments");
  1670. b.Navigation("UserTaskHistories");
  1671. });
  1672. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  1673. {
  1674. b.Navigation("RolePermissions");
  1675. });
  1676. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  1677. {
  1678. b.Navigation("UserAddress")
  1679. .IsRequired();
  1680. b.Navigation("UserAttachments");
  1681. });
  1682. #pragma warning restore 612, 618
  1683. }
  1684. }
  1685. }