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