20240327101748_altrcompany.Designer.cs 82 KB

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