HRDataContextModelSnapshot.cs 81 KB

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