20240318090642_orderReq.Designer.cs 80 KB

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