20240403151641_country.Designer.cs 86 KB

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