HRDataContextModelSnapshot.cs 125 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416
  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<long>("CompanyId")
  45. .HasColumnType("bigint");
  46. b.Property<DateTime>("CreateDate")
  47. .HasColumnType("datetime2")
  48. .HasColumnOrder(3);
  49. b.Property<string>("CreateUser")
  50. .HasMaxLength(450)
  51. .HasColumnType("nvarchar(450)")
  52. .HasColumnOrder(1);
  53. b.Property<string>("DeleteUserId")
  54. .HasMaxLength(450)
  55. .HasColumnType("nvarchar(450)")
  56. .HasColumnOrder(8);
  57. b.Property<bool>("IsDeleted")
  58. .HasColumnType("bit")
  59. .HasColumnOrder(7);
  60. b.Property<string>("LeaveReason")
  61. .HasMaxLength(250)
  62. .HasColumnType("nvarchar(250)");
  63. b.Property<int>("LeaveType")
  64. .HasColumnType("int");
  65. b.Property<DateTime?>("UpdateDate")
  66. .HasColumnType("datetime2")
  67. .HasColumnOrder(4);
  68. b.Property<string>("UpdateUser")
  69. .HasMaxLength(450)
  70. .HasColumnType("nvarchar(450)")
  71. .HasColumnOrder(2);
  72. b.Property<string>("UserId")
  73. .IsRequired()
  74. .HasColumnType("nvarchar(max)");
  75. b.Property<string>("UserName")
  76. .HasColumnType("nvarchar(max)");
  77. b.HasKey("Id");
  78. b.HasIndex("CompanyId");
  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 = "Passport"
  196. },
  197. new
  198. {
  199. Id = 3L,
  200. IsRequired = false,
  201. NameAr = "شهادة التعليم",
  202. NameEn = "Education Certification"
  203. },
  204. new
  205. {
  206. Id = 4L,
  207. IsRequired = false,
  208. NameAr = "شهادة الخبرة",
  209. NameEn = "Experience Certification"
  210. },
  211. new
  212. {
  213. Id = 5L,
  214. IsRequired = false,
  215. NameAr = "شهادة الاحتراف",
  216. NameEn = "Professional Certification"
  217. },
  218. new
  219. {
  220. Id = 6L,
  221. IsRequired = false,
  222. NameAr = "التسجيل التجارى",
  223. NameEn = "Commercial Regestration"
  224. },
  225. new
  226. {
  227. Id = 7L,
  228. IsRequired = false,
  229. NameAr = "البطاقة الضريبية",
  230. NameEn = "Tax Declaration"
  231. },
  232. new
  233. {
  234. Id = 8L,
  235. IsRequired = false,
  236. NameAr = "الهوية",
  237. NameEn = "Identification"
  238. },
  239. new
  240. {
  241. Id = 9L,
  242. IsRequired = false,
  243. NameAr = "الصورة",
  244. NameEn = "Image"
  245. });
  246. });
  247. modelBuilder.Entity("MTWorkHR.Core.Entities.City", b =>
  248. {
  249. b.Property<long>("Id")
  250. .ValueGeneratedOnAdd()
  251. .HasColumnType("bigint")
  252. .HasColumnOrder(0);
  253. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  254. b.Property<string>("Code")
  255. .IsRequired()
  256. .HasColumnType("nvarchar(max)");
  257. b.Property<long>("CountryId")
  258. .HasColumnType("bigint");
  259. b.Property<string>("NameAr")
  260. .IsRequired()
  261. .HasMaxLength(250)
  262. .HasColumnType("nvarchar(250)");
  263. b.Property<string>("NameEn")
  264. .IsRequired()
  265. .HasMaxLength(250)
  266. .HasColumnType("nvarchar(250)");
  267. b.Property<string>("NameFr")
  268. .IsRequired()
  269. .HasColumnType("nvarchar(max)");
  270. b.HasKey("Id");
  271. b.HasIndex("CountryId");
  272. b.ToTable("Cities");
  273. });
  274. modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
  275. {
  276. b.Property<long>("Id")
  277. .ValueGeneratedOnAdd()
  278. .HasColumnType("bigint")
  279. .HasColumnOrder(0);
  280. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  281. b.Property<string>("CRNumber")
  282. .IsRequired()
  283. .HasColumnType("nvarchar(max)");
  284. b.Property<string>("CompanyName")
  285. .IsRequired()
  286. .HasColumnType("nvarchar(max)");
  287. b.Property<DateTime>("CreateDate")
  288. .HasColumnType("datetime2")
  289. .HasColumnOrder(3);
  290. b.Property<string>("CreateUser")
  291. .HasMaxLength(450)
  292. .HasColumnType("nvarchar(450)")
  293. .HasColumnOrder(1);
  294. b.Property<string>("DeleteUserId")
  295. .HasMaxLength(450)
  296. .HasColumnType("nvarchar(450)")
  297. .HasColumnOrder(8);
  298. b.Property<bool>("IsDeleted")
  299. .HasColumnType("bit")
  300. .HasColumnOrder(7);
  301. b.Property<int>("TaxNumber")
  302. .HasColumnType("int");
  303. b.Property<DateTime?>("UpdateDate")
  304. .HasColumnType("datetime2")
  305. .HasColumnOrder(4);
  306. b.Property<string>("UpdateUser")
  307. .HasMaxLength(450)
  308. .HasColumnType("nvarchar(450)")
  309. .HasColumnOrder(2);
  310. b.Property<string>("UserId")
  311. .IsRequired()
  312. .HasColumnType("nvarchar(max)");
  313. b.HasKey("Id");
  314. b.ToTable("Companies");
  315. });
  316. modelBuilder.Entity("MTWorkHR.Core.Entities.CountryLookup", b =>
  317. {
  318. b.Property<long>("Id")
  319. .ValueGeneratedOnAdd()
  320. .HasColumnType("bigint")
  321. .HasColumnOrder(0);
  322. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  323. b.Property<string>("Code")
  324. .IsRequired()
  325. .HasColumnType("nvarchar(max)");
  326. b.Property<string>("NameAr")
  327. .IsRequired()
  328. .HasMaxLength(250)
  329. .HasColumnType("nvarchar(250)");
  330. b.Property<string>("NameEn")
  331. .IsRequired()
  332. .HasMaxLength(250)
  333. .HasColumnType("nvarchar(250)");
  334. b.Property<string>("NameFr")
  335. .IsRequired()
  336. .HasColumnType("nvarchar(max)");
  337. b.HasKey("Id");
  338. b.ToTable("CountryLookups");
  339. });
  340. modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
  341. {
  342. b.Property<long>("Id")
  343. .ValueGeneratedOnAdd()
  344. .HasColumnType("bigint")
  345. .HasColumnOrder(0);
  346. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  347. b.Property<string>("Channel")
  348. .HasColumnType("nvarchar(max)");
  349. b.Property<DateTime>("CreateDate")
  350. .HasColumnType("datetime2");
  351. b.Property<string>("CreateUser")
  352. .IsRequired()
  353. .HasColumnType("nvarchar(max)");
  354. b.Property<string>("ErrorCode")
  355. .IsRequired()
  356. .HasColumnType("nvarchar(max)");
  357. b.Property<string>("ErrorDescription")
  358. .IsRequired()
  359. .HasColumnType("nvarchar(max)");
  360. b.Property<string>("InnerException")
  361. .HasColumnType("nvarchar(max)");
  362. b.Property<string>("Input")
  363. .HasColumnType("nvarchar(max)");
  364. b.Property<string>("Method")
  365. .IsRequired()
  366. .HasColumnType("nvarchar(max)");
  367. b.Property<string>("QueryString")
  368. .HasColumnType("nvarchar(max)");
  369. b.Property<string>("ServerIP")
  370. .HasColumnType("nvarchar(max)");
  371. b.Property<string>("ServiceResponseTimeInSeconds")
  372. .IsRequired()
  373. .HasColumnType("nvarchar(max)");
  374. b.Property<string>("UserIP")
  375. .HasColumnType("nvarchar(max)");
  376. b.Property<string>("userAgent")
  377. .HasColumnType("nvarchar(max)");
  378. b.HasKey("Id");
  379. b.ToTable("FileLogs");
  380. });
  381. modelBuilder.Entity("MTWorkHR.Core.Entities.Industry", b =>
  382. {
  383. b.Property<long>("Id")
  384. .ValueGeneratedOnAdd()
  385. .HasColumnType("bigint")
  386. .HasColumnOrder(0);
  387. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  388. b.Property<string>("NameAr")
  389. .IsRequired()
  390. .HasMaxLength(250)
  391. .HasColumnType("nvarchar(250)");
  392. b.Property<string>("NameEn")
  393. .IsRequired()
  394. .HasMaxLength(250)
  395. .HasColumnType("nvarchar(250)");
  396. b.HasKey("Id");
  397. b.ToTable("Industries");
  398. b.HasData(
  399. new
  400. {
  401. Id = 1L,
  402. NameAr = "صناعة الطيران والفضاء",
  403. NameEn = "Aerospace industry"
  404. },
  405. new
  406. {
  407. Id = 2L,
  408. NameAr = "صناعة الزراعة",
  409. NameEn = "Agricultural industry"
  410. },
  411. new
  412. {
  413. Id = 3L,
  414. NameAr = "صناعة السيارات",
  415. NameEn = "Automotive industry"
  416. },
  417. new
  418. {
  419. Id = 4L,
  420. NameAr = "صناعة المعادن الأساسية",
  421. NameEn = "Basic metal"
  422. },
  423. new
  424. {
  425. Id = 5L,
  426. NameAr = "صناعة الكيماويات",
  427. NameEn = "Chemical industry"
  428. },
  429. new
  430. {
  431. Id = 6L,
  432. NameAr = "صناعة الحواسيب",
  433. NameEn = "Computer industry"
  434. },
  435. new
  436. {
  437. Id = 7L,
  438. NameAr = "صناعة البناء",
  439. NameEn = "Construction industry"
  440. },
  441. new
  442. {
  443. Id = 8L,
  444. NameAr = "صناعة الإبداعية",
  445. NameEn = "Creative industry"
  446. },
  447. new
  448. {
  449. Id = 9L,
  450. NameAr = "صناعة الثقافة",
  451. NameEn = "Cultural industry"
  452. },
  453. new
  454. {
  455. Id = 10L,
  456. NameAr = "صناعة الدفاع",
  457. NameEn = "Defense industry"
  458. },
  459. new
  460. {
  461. Id = 11L,
  462. NameAr = "صناعة التعليم",
  463. NameEn = "Education industry"
  464. },
  465. new
  466. {
  467. Id = 12L,
  468. NameAr = "صناعة الطاقة الكهربائية",
  469. NameEn = "Electric power"
  470. },
  471. new
  472. {
  473. Id = 13L,
  474. NameAr = "صناعة الإلكترونيات",
  475. NameEn = "Electronics industry"
  476. },
  477. new
  478. {
  479. Id = 14L,
  480. NameAr = "صناعة الطاقة",
  481. NameEn = "Energy industry"
  482. },
  483. new
  484. {
  485. Id = 15L,
  486. NameAr = "صناعة الهندسة",
  487. NameEn = "Engineering industry"
  488. },
  489. new
  490. {
  491. Id = 16L,
  492. NameAr = "صناعة الترفيه",
  493. NameEn = "Entertainment industry"
  494. },
  495. new
  496. {
  497. Id = 17L,
  498. NameAr = "صناعة الزراعة",
  499. NameEn = "Farming industry"
  500. },
  501. new
  502. {
  503. Id = 18L,
  504. NameAr = "صناعة الموضة",
  505. NameEn = "Fashion industry"
  506. },
  507. new
  508. {
  509. Id = 19L,
  510. NameAr = "صناعة السينما",
  511. NameEn = "Film industry"
  512. },
  513. new
  514. {
  515. Id = 20L,
  516. NameAr = "صناعة الخدمات المالية",
  517. NameEn = "Financial services"
  518. },
  519. new
  520. {
  521. Id = 21L,
  522. NameAr = "صناعة الصيد",
  523. NameEn = "Fishing industry"
  524. },
  525. new
  526. {
  527. Id = 22L,
  528. NameAr = "صناعة الأغذية",
  529. NameEn = "Food industry"
  530. },
  531. new
  532. {
  533. Id = 23L,
  534. NameAr = "صناعة الغابات",
  535. NameEn = "Forestry industry"
  536. },
  537. new
  538. {
  539. Id = 24L,
  540. NameAr = "صناعة القمار",
  541. NameEn = "Gambling industry"
  542. },
  543. new
  544. {
  545. Id = 25L,
  546. NameAr = "صناعة الغاز",
  547. NameEn = "Gas industry"
  548. },
  549. new
  550. {
  551. Id = 26L,
  552. NameAr = "صناعة البيئة",
  553. NameEn = "Green industry"
  554. },
  555. new
  556. {
  557. Id = 27L,
  558. NameAr = "صناعة الخدمات الصحية",
  559. NameEn = "Health services industry"
  560. },
  561. new
  562. {
  563. Id = 28L,
  564. NameAr = "صناعة الضيافة",
  565. NameEn = "Hospitality industry"
  566. },
  567. new
  568. {
  569. Id = 29L,
  570. NameAr = "صناعة الفنادق",
  571. NameEn = "Hotels industry"
  572. },
  573. new
  574. {
  575. Id = 30L,
  576. NameAr = "صناعة الروبوتات الصناعية",
  577. NameEn = "Industrial robot"
  578. },
  579. new
  580. {
  581. Id = 31L,
  582. NameAr = "صناعة المعلومات",
  583. NameEn = "Information industry"
  584. },
  585. new
  586. {
  587. Id = 32L,
  588. NameAr = "صناعة تكنولوجيا المعلومات",
  589. NameEn = "Information technology"
  590. },
  591. new
  592. {
  593. Id = 33L,
  594. NameAr = "صناعة البنية التحتية",
  595. NameEn = "Infrastructure industry"
  596. },
  597. new
  598. {
  599. Id = 34L,
  600. NameAr = "صناعة التأمين",
  601. NameEn = "Insurance industry"
  602. },
  603. new
  604. {
  605. Id = 35L,
  606. NameAr = "صناعة الترفيه",
  607. NameEn = "Leisure industry"
  608. },
  609. new
  610. {
  611. Id = 36L,
  612. NameAr = "صناعة التكنولوجيا المنخفضة",
  613. NameEn = "Low technology"
  614. },
  615. new
  616. {
  617. Id = 37L,
  618. NameAr = "صناعة التصنيع",
  619. NameEn = "Manufacturing industry"
  620. },
  621. new
  622. {
  623. Id = 38L,
  624. NameAr = "صناعة اللحوم",
  625. NameEn = "Meat industry"
  626. },
  627. new
  628. {
  629. Id = 39L,
  630. NameAr = "صناعة الإعلام",
  631. NameEn = "Media industry"
  632. },
  633. new
  634. {
  635. Id = 40L,
  636. NameAr = "صناعة التجارة",
  637. NameEn = "Merchandising industry"
  638. },
  639. new
  640. {
  641. Id = 41L,
  642. NameAr = "صناعة التعدين",
  643. NameEn = "Mining industry"
  644. },
  645. new
  646. {
  647. Id = 42L,
  648. NameAr = "صناعة الموسيقى",
  649. NameEn = "Music industry"
  650. },
  651. new
  652. {
  653. Id = 43L,
  654. NameAr = "صناعة وسائل الإعلام",
  655. NameEn = "News media"
  656. },
  657. new
  658. {
  659. Id = 44L,
  660. NameAr = "صناعة النفط والغاز",
  661. NameEn = "Oil and gas industry"
  662. },
  663. new
  664. {
  665. Id = 45L,
  666. NameAr = "صناعة الأدوية",
  667. NameEn = "Pharmaceutical industry"
  668. },
  669. new
  670. {
  671. Id = 46L,
  672. NameAr = "صناعة المهنية",
  673. NameEn = "Professional industry"
  674. },
  675. new
  676. {
  677. Id = 47L,
  678. NameAr = "صناعة النشر",
  679. NameEn = "Publishing industry"
  680. },
  681. new
  682. {
  683. Id = 48L,
  684. NameAr = "صناعة الورق واللب",
  685. NameEn = "Pulp and paper industry"
  686. },
  687. new
  688. {
  689. Id = 49L,
  690. NameAr = "صناعة السكك الحديدية",
  691. NameEn = "Railway industry"
  692. },
  693. new
  694. {
  695. Id = 50L,
  696. NameAr = "الانشاءات",
  697. NameEn = "Real estate"
  698. });
  699. });
  700. modelBuilder.Entity("MTWorkHR.Core.Entities.JobTitle", b =>
  701. {
  702. b.Property<long>("Id")
  703. .ValueGeneratedOnAdd()
  704. .HasColumnType("bigint")
  705. .HasColumnOrder(0);
  706. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  707. b.Property<string>("NameAr")
  708. .IsRequired()
  709. .HasMaxLength(250)
  710. .HasColumnType("nvarchar(250)");
  711. b.Property<string>("NameEn")
  712. .IsRequired()
  713. .HasMaxLength(250)
  714. .HasColumnType("nvarchar(250)");
  715. b.HasKey("Id");
  716. b.ToTable("JobTitles");
  717. b.HasData(
  718. new
  719. {
  720. Id = 1L,
  721. NameAr = "مساعد ادارى",
  722. NameEn = "Administrative Assistant"
  723. },
  724. new
  725. {
  726. Id = 2L,
  727. NameAr = "موظف استقبال",
  728. NameEn = "Receptionist"
  729. },
  730. new
  731. {
  732. Id = 3L,
  733. NameAr = "مدير مكتب",
  734. NameEn = "Office Manager"
  735. },
  736. new
  737. {
  738. Id = 4L,
  739. NameAr = "مدقق محتوى",
  740. NameEn = "Auditing Clerk"
  741. },
  742. new
  743. {
  744. Id = 5L,
  745. NameAr = "محاسب",
  746. NameEn = "Bookkeeper"
  747. },
  748. new
  749. {
  750. Id = 6L,
  751. NameAr = "مدير تنفيذى",
  752. NameEn = "Account Executive"
  753. },
  754. new
  755. {
  756. Id = 7L,
  757. NameAr = "مدير فرع",
  758. NameEn = "Branch Manager"
  759. },
  760. new
  761. {
  762. Id = 8L,
  763. NameAr = "مدير",
  764. NameEn = "Business Manager"
  765. },
  766. new
  767. {
  768. Id = 9L,
  769. NameAr = "مسؤول الجودة",
  770. NameEn = "Quality Control Coordinator"
  771. },
  772. new
  773. {
  774. Id = 10L,
  775. NameAr = "مدير ادارى",
  776. NameEn = "Administrative Manager"
  777. },
  778. new
  779. {
  780. Id = 11L,
  781. NameAr = "الرئيس التنفيذي",
  782. NameEn = "Chief Executive Officer"
  783. },
  784. new
  785. {
  786. Id = 12L,
  787. NameAr = "محلل",
  788. NameEn = "Business Analyst"
  789. },
  790. new
  791. {
  792. Id = 13L,
  793. NameAr = "مدير المخاطر",
  794. NameEn = "Risk Manager"
  795. },
  796. new
  797. {
  798. Id = 14L,
  799. NameAr = "موارد بشرية",
  800. NameEn = "Human Resources"
  801. },
  802. new
  803. {
  804. Id = 15L,
  805. NameAr = "مساعد مكتب",
  806. NameEn = "Office Assistant"
  807. },
  808. new
  809. {
  810. Id = 16L,
  811. NameAr = "السكرتارية",
  812. NameEn = "Secretary"
  813. },
  814. new
  815. {
  816. Id = 17L,
  817. NameAr = "موظف مكتب",
  818. NameEn = "Office Clerk"
  819. },
  820. new
  821. {
  822. Id = 18L,
  823. NameAr = "جامع الحسابات",
  824. NameEn = "Account Collector"
  825. },
  826. new
  827. {
  828. Id = 19L,
  829. NameAr = "أخصائي إداري",
  830. NameEn = "Administrative Specialist"
  831. },
  832. new
  833. {
  834. Id = 20L,
  835. NameAr = "مساعد تنفيذي",
  836. NameEn = "Executive Assistant"
  837. },
  838. new
  839. {
  840. Id = 21L,
  841. NameAr = "مسؤل البرنامج",
  842. NameEn = "Program Administrator"
  843. },
  844. new
  845. {
  846. Id = 22L,
  847. NameAr = "مدير البرنامج",
  848. NameEn = "Program Manager"
  849. },
  850. new
  851. {
  852. Id = 23L,
  853. NameAr = "محلل إداري",
  854. NameEn = "Administrative Analyst"
  855. },
  856. new
  857. {
  858. Id = 24L,
  859. NameAr = "مدخل بيانات",
  860. NameEn = "Data Entry"
  861. });
  862. });
  863. modelBuilder.Entity("MTWorkHR.Core.Entities.LeaveType", b =>
  864. {
  865. b.Property<long>("Id")
  866. .ValueGeneratedOnAdd()
  867. .HasColumnType("bigint")
  868. .HasColumnOrder(0);
  869. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  870. b.Property<int>("DefaultDays")
  871. .HasColumnType("int");
  872. b.Property<string>("NameAr")
  873. .IsRequired()
  874. .HasColumnType("nvarchar(max)");
  875. b.Property<string>("NameEn")
  876. .IsRequired()
  877. .HasColumnType("nvarchar(max)");
  878. b.HasKey("Id");
  879. b.ToTable("LeaveTypes");
  880. b.HasData(
  881. new
  882. {
  883. Id = 1L,
  884. DefaultDays = 21,
  885. NameAr = "أجازة سنوية",
  886. NameEn = "Annual Leave"
  887. },
  888. new
  889. {
  890. Id = 2L,
  891. DefaultDays = 15,
  892. NameAr = "أجازة مرضية",
  893. NameEn = "Sick Leave"
  894. },
  895. new
  896. {
  897. Id = 3L,
  898. DefaultDays = 20,
  899. NameAr = "أجازة زواج",
  900. NameEn = "Marriage Leave"
  901. },
  902. new
  903. {
  904. Id = 4L,
  905. DefaultDays = 10,
  906. NameAr = "أجازة وضع",
  907. NameEn = "Paternity leave"
  908. },
  909. new
  910. {
  911. Id = 5L,
  912. DefaultDays = 10,
  913. NameAr = "أجازة طارئة",
  914. NameEn = "Emergency leave"
  915. });
  916. });
  917. modelBuilder.Entity("MTWorkHR.Core.Entities.LoginOTP", b =>
  918. {
  919. b.Property<long>("Id")
  920. .ValueGeneratedOnAdd()
  921. .HasColumnType("bigint")
  922. .HasColumnOrder(0);
  923. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  924. b.Property<DateTime>("CreateDate")
  925. .HasColumnType("datetime2");
  926. b.Property<DateTime>("ExpireDate")
  927. .HasColumnType("datetime2");
  928. b.Property<string>("OTP")
  929. .IsRequired()
  930. .HasColumnType("nvarchar(max)");
  931. b.Property<string>("UserId")
  932. .IsRequired()
  933. .HasColumnType("nvarchar(max)");
  934. b.HasKey("Id");
  935. b.ToTable("LoginOTPs");
  936. });
  937. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  938. {
  939. b.Property<long>("Id")
  940. .ValueGeneratedOnAdd()
  941. .HasColumnType("bigint")
  942. .HasColumnOrder(0);
  943. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  944. b.Property<long>("CompanyId")
  945. .HasColumnType("bigint");
  946. b.Property<DateTime>("CreateDate")
  947. .HasColumnType("datetime2")
  948. .HasColumnOrder(3);
  949. b.Property<string>("CreateUser")
  950. .HasMaxLength(450)
  951. .HasColumnType("nvarchar(450)")
  952. .HasColumnOrder(1);
  953. b.Property<string>("DeleteUserId")
  954. .HasMaxLength(450)
  955. .HasColumnType("nvarchar(450)")
  956. .HasColumnOrder(8);
  957. b.Property<string>("Description")
  958. .HasMaxLength(500)
  959. .HasColumnType("nvarchar(500)");
  960. b.Property<string>("EndTime")
  961. .IsRequired()
  962. .HasColumnType("nvarchar(max)");
  963. b.Property<bool>("IsDeleted")
  964. .HasColumnType("bit")
  965. .HasColumnOrder(7);
  966. b.Property<string>("Location")
  967. .HasMaxLength(250)
  968. .HasColumnType("nvarchar(250)");
  969. b.Property<DateTime>("MeetingDate")
  970. .HasColumnType("datetime2");
  971. b.Property<string>("MeetingLink")
  972. .HasMaxLength(250)
  973. .HasColumnType("nvarchar(250)");
  974. b.Property<int>("RepeatId")
  975. .HasColumnType("int");
  976. b.Property<string>("StartTime")
  977. .IsRequired()
  978. .HasColumnType("nvarchar(max)");
  979. b.Property<string>("Title")
  980. .IsRequired()
  981. .HasMaxLength(250)
  982. .HasColumnType("nvarchar(250)");
  983. b.Property<DateTime?>("UpdateDate")
  984. .HasColumnType("datetime2")
  985. .HasColumnOrder(4);
  986. b.Property<string>("UpdateUser")
  987. .HasMaxLength(450)
  988. .HasColumnType("nvarchar(450)")
  989. .HasColumnOrder(2);
  990. b.HasKey("Id");
  991. b.HasIndex("CompanyId");
  992. b.ToTable("Meetings");
  993. });
  994. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingLog", b =>
  995. {
  996. b.Property<long>("Id")
  997. .ValueGeneratedOnAdd()
  998. .HasColumnType("bigint")
  999. .HasColumnOrder(0);
  1000. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1001. b.Property<string>("Channel")
  1002. .HasColumnType("nvarchar(max)");
  1003. b.Property<DateTime>("CreateDate")
  1004. .HasColumnType("datetime2");
  1005. b.Property<string>("CreateUser")
  1006. .IsRequired()
  1007. .HasColumnType("nvarchar(max)");
  1008. b.Property<string>("ErrorCode")
  1009. .IsRequired()
  1010. .HasColumnType("nvarchar(max)");
  1011. b.Property<string>("ErrorDescription")
  1012. .IsRequired()
  1013. .HasColumnType("nvarchar(max)");
  1014. b.Property<string>("InnerException")
  1015. .HasColumnType("nvarchar(max)");
  1016. b.Property<string>("Input")
  1017. .HasColumnType("nvarchar(max)");
  1018. b.Property<string>("Method")
  1019. .IsRequired()
  1020. .HasColumnType("nvarchar(max)");
  1021. b.Property<string>("QueryString")
  1022. .HasColumnType("nvarchar(max)");
  1023. b.Property<string>("ServerIP")
  1024. .HasColumnType("nvarchar(max)");
  1025. b.Property<string>("ServiceResponseTimeInSeconds")
  1026. .IsRequired()
  1027. .HasColumnType("nvarchar(max)");
  1028. b.Property<string>("UserIP")
  1029. .HasColumnType("nvarchar(max)");
  1030. b.Property<string>("userAgent")
  1031. .HasColumnType("nvarchar(max)");
  1032. b.HasKey("Id");
  1033. b.ToTable("MeetingLogs");
  1034. });
  1035. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  1036. {
  1037. b.Property<long>("Id")
  1038. .ValueGeneratedOnAdd()
  1039. .HasColumnType("bigint")
  1040. .HasColumnOrder(0);
  1041. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1042. b.Property<string>("AssignedUserId")
  1043. .IsRequired()
  1044. .HasColumnType("nvarchar(max)");
  1045. b.Property<string>("AssignedUserName")
  1046. .IsRequired()
  1047. .HasColumnType("nvarchar(max)");
  1048. b.Property<DateTime>("CreateDate")
  1049. .HasColumnType("datetime2")
  1050. .HasColumnOrder(3);
  1051. b.Property<string>("CreateUser")
  1052. .HasMaxLength(450)
  1053. .HasColumnType("nvarchar(450)")
  1054. .HasColumnOrder(1);
  1055. b.Property<long>("MeetingId")
  1056. .HasColumnType("bigint");
  1057. b.Property<DateTime?>("UpdateDate")
  1058. .HasColumnType("datetime2")
  1059. .HasColumnOrder(4);
  1060. b.Property<string>("UpdateUser")
  1061. .HasMaxLength(450)
  1062. .HasColumnType("nvarchar(450)")
  1063. .HasColumnOrder(2);
  1064. b.HasKey("Id");
  1065. b.HasIndex("MeetingId");
  1066. b.ToTable("MeetingUser");
  1067. });
  1068. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAllocation", b =>
  1069. {
  1070. b.Property<long>("Id")
  1071. .ValueGeneratedOnAdd()
  1072. .HasColumnType("bigint")
  1073. .HasColumnOrder(0);
  1074. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1075. b.Property<long>("CompanyId")
  1076. .HasColumnType("bigint");
  1077. b.Property<DateTime>("CreateDate")
  1078. .HasColumnType("datetime2")
  1079. .HasColumnOrder(3);
  1080. b.Property<string>("CreateUser")
  1081. .HasMaxLength(450)
  1082. .HasColumnType("nvarchar(450)")
  1083. .HasColumnOrder(1);
  1084. b.Property<string>("EmployeeId")
  1085. .IsRequired()
  1086. .HasColumnType("nvarchar(max)");
  1087. b.Property<long?>("LeaveTypeId")
  1088. .HasColumnType("bigint");
  1089. b.Property<int>("NumberOfDays")
  1090. .HasColumnType("int");
  1091. b.Property<long>("OrderTypeId")
  1092. .HasColumnType("bigint");
  1093. b.Property<int>("Period")
  1094. .HasColumnType("int");
  1095. b.Property<DateTime?>("UpdateDate")
  1096. .HasColumnType("datetime2")
  1097. .HasColumnOrder(4);
  1098. b.Property<string>("UpdateUser")
  1099. .HasMaxLength(450)
  1100. .HasColumnType("nvarchar(450)")
  1101. .HasColumnOrder(2);
  1102. b.HasKey("Id");
  1103. b.HasIndex("CompanyId");
  1104. b.HasIndex("LeaveTypeId");
  1105. b.HasIndex("OrderTypeId");
  1106. b.ToTable("OrderAllocations");
  1107. });
  1108. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderType", b =>
  1109. {
  1110. b.Property<long>("Id")
  1111. .ValueGeneratedOnAdd()
  1112. .HasColumnType("bigint")
  1113. .HasColumnOrder(0);
  1114. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1115. b.Property<int>("DefaultDays")
  1116. .HasColumnType("int");
  1117. b.Property<string>("NameAr")
  1118. .IsRequired()
  1119. .HasColumnType("nvarchar(max)");
  1120. b.Property<string>("NameEn")
  1121. .IsRequired()
  1122. .HasColumnType("nvarchar(max)");
  1123. b.HasKey("Id");
  1124. b.ToTable("OrderTypes");
  1125. b.HasData(
  1126. new
  1127. {
  1128. Id = 1L,
  1129. DefaultDays = 2,
  1130. NameAr = "إذن",
  1131. NameEn = "Leave"
  1132. },
  1133. new
  1134. {
  1135. Id = 2L,
  1136. DefaultDays = 15,
  1137. NameAr = "طبية",
  1138. NameEn = "Medical"
  1139. },
  1140. new
  1141. {
  1142. Id = 3L,
  1143. DefaultDays = 20,
  1144. NameAr = "وقت إضافي",
  1145. NameEn = "Overtime"
  1146. },
  1147. new
  1148. {
  1149. Id = 4L,
  1150. DefaultDays = 0,
  1151. NameAr = "رحلة عمل",
  1152. NameEn = "Business trip"
  1153. },
  1154. new
  1155. {
  1156. Id = 5L,
  1157. DefaultDays = 0,
  1158. NameAr = "دورة تدريبية",
  1159. NameEn = "Course"
  1160. });
  1161. });
  1162. modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
  1163. {
  1164. b.Property<long>("Id")
  1165. .ValueGeneratedOnAdd()
  1166. .HasColumnType("bigint")
  1167. .HasColumnOrder(0);
  1168. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1169. b.Property<string>("CategoryName")
  1170. .IsRequired()
  1171. .HasMaxLength(150)
  1172. .HasColumnType("nvarchar(150)");
  1173. b.Property<string>("Desc")
  1174. .IsRequired()
  1175. .HasMaxLength(250)
  1176. .HasColumnType("nvarchar(250)");
  1177. b.Property<string>("Name")
  1178. .IsRequired()
  1179. .HasMaxLength(250)
  1180. .HasColumnType("nvarchar(250)");
  1181. b.Property<bool>("Show")
  1182. .HasColumnType("bit");
  1183. b.HasKey("Id");
  1184. b.ToTable("Permissions");
  1185. b.HasData(
  1186. new
  1187. {
  1188. Id = 1L,
  1189. CategoryName = "User",
  1190. Desc = "Project",
  1191. Name = "Project",
  1192. Show = true
  1193. },
  1194. new
  1195. {
  1196. Id = 2L,
  1197. CategoryName = "User",
  1198. Desc = "Project.Create",
  1199. Name = "Project.Create",
  1200. Show = false
  1201. },
  1202. new
  1203. {
  1204. Id = 3L,
  1205. CategoryName = "User",
  1206. Desc = "Project.Update",
  1207. Name = "Project.Update",
  1208. Show = false
  1209. },
  1210. new
  1211. {
  1212. Id = 4L,
  1213. CategoryName = "User",
  1214. Desc = "Project.Delete",
  1215. Name = "Project.Delete",
  1216. Show = false
  1217. },
  1218. new
  1219. {
  1220. Id = 5L,
  1221. CategoryName = "User",
  1222. Desc = "Meeting",
  1223. Name = "Meeting",
  1224. Show = true
  1225. },
  1226. new
  1227. {
  1228. Id = 6L,
  1229. CategoryName = "User",
  1230. Desc = "Meeting.Create",
  1231. Name = "Meeting.Create",
  1232. Show = false
  1233. },
  1234. new
  1235. {
  1236. Id = 7L,
  1237. CategoryName = "User",
  1238. Desc = "Meeting.Update",
  1239. Name = "Meeting.Update",
  1240. Show = false
  1241. },
  1242. new
  1243. {
  1244. Id = 8L,
  1245. CategoryName = "User",
  1246. Desc = "Meeting.Delete",
  1247. Name = "Meeting.Delete",
  1248. Show = false
  1249. },
  1250. new
  1251. {
  1252. Id = 9L,
  1253. CategoryName = "User",
  1254. Desc = "Team",
  1255. Name = "Team",
  1256. Show = true
  1257. },
  1258. new
  1259. {
  1260. Id = 10L,
  1261. CategoryName = "User",
  1262. Desc = "Team.Create",
  1263. Name = "Team.Create",
  1264. Show = false
  1265. },
  1266. new
  1267. {
  1268. Id = 11L,
  1269. CategoryName = "User",
  1270. Desc = "Team.Update",
  1271. Name = "Team.Update",
  1272. Show = false
  1273. },
  1274. new
  1275. {
  1276. Id = 12L,
  1277. CategoryName = "User",
  1278. Desc = "Team.Delete",
  1279. Name = "Team.Delete",
  1280. Show = false
  1281. },
  1282. new
  1283. {
  1284. Id = 13L,
  1285. CategoryName = "Sales",
  1286. Desc = "UserTask",
  1287. Name = "UserTask",
  1288. Show = true
  1289. },
  1290. new
  1291. {
  1292. Id = 14L,
  1293. CategoryName = "Sales",
  1294. Desc = "UserTask.Create",
  1295. Name = "UserTask.Create",
  1296. Show = false
  1297. },
  1298. new
  1299. {
  1300. Id = 15L,
  1301. CategoryName = "Sales",
  1302. Desc = "UserTask.Update",
  1303. Name = "UserTask.Update",
  1304. Show = false
  1305. },
  1306. new
  1307. {
  1308. Id = 16L,
  1309. CategoryName = "User",
  1310. Desc = "UserTask.Delete",
  1311. Name = "UserTask.Delete",
  1312. Show = false
  1313. },
  1314. new
  1315. {
  1316. Id = 17L,
  1317. CategoryName = "User",
  1318. Desc = "Company",
  1319. Name = "Company",
  1320. Show = true
  1321. },
  1322. new
  1323. {
  1324. Id = 18L,
  1325. CategoryName = "User",
  1326. Desc = "Company.Create",
  1327. Name = "Company.Create",
  1328. Show = false
  1329. },
  1330. new
  1331. {
  1332. Id = 19L,
  1333. CategoryName = "User",
  1334. Desc = "Company.Update",
  1335. Name = "Company.Update",
  1336. Show = false
  1337. },
  1338. new
  1339. {
  1340. Id = 20L,
  1341. CategoryName = "User",
  1342. Desc = "Company.Delete",
  1343. Name = "Company.Delete",
  1344. Show = false
  1345. },
  1346. new
  1347. {
  1348. Id = 21L,
  1349. CategoryName = "Adminstration",
  1350. Desc = "User",
  1351. Name = "User",
  1352. Show = true
  1353. },
  1354. new
  1355. {
  1356. Id = 22L,
  1357. CategoryName = "Adminstration",
  1358. Desc = "User.Create",
  1359. Name = "User.Create",
  1360. Show = false
  1361. },
  1362. new
  1363. {
  1364. Id = 23L,
  1365. CategoryName = "Adminstration",
  1366. Desc = "User.Update",
  1367. Name = "User.Update",
  1368. Show = false
  1369. },
  1370. new
  1371. {
  1372. Id = 24L,
  1373. CategoryName = "Adminstration",
  1374. Desc = "User.Delete",
  1375. Name = "User.Delete",
  1376. Show = false
  1377. },
  1378. new
  1379. {
  1380. Id = 25L,
  1381. CategoryName = "Adminstration",
  1382. Desc = "Role",
  1383. Name = "Role",
  1384. Show = true
  1385. },
  1386. new
  1387. {
  1388. Id = 26L,
  1389. CategoryName = "Adminstration",
  1390. Desc = "Role.Create",
  1391. Name = "Role.Create",
  1392. Show = false
  1393. },
  1394. new
  1395. {
  1396. Id = 27L,
  1397. CategoryName = "Adminstration",
  1398. Desc = "Role.Update",
  1399. Name = "Role.Update",
  1400. Show = false
  1401. },
  1402. new
  1403. {
  1404. Id = 28L,
  1405. CategoryName = "Adminstration",
  1406. Desc = "Role.Delete",
  1407. Name = "Role.Delete",
  1408. Show = false
  1409. });
  1410. });
  1411. modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
  1412. {
  1413. b.Property<long>("Id")
  1414. .ValueGeneratedOnAdd()
  1415. .HasColumnType("bigint")
  1416. .HasColumnOrder(0);
  1417. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1418. b.Property<long>("CompanyId")
  1419. .HasColumnType("bigint");
  1420. b.Property<DateTime>("CreateDate")
  1421. .HasColumnType("datetime2")
  1422. .HasColumnOrder(3);
  1423. b.Property<string>("CreateUser")
  1424. .HasMaxLength(450)
  1425. .HasColumnType("nvarchar(450)")
  1426. .HasColumnOrder(1);
  1427. b.Property<string>("DeleteUserId")
  1428. .HasMaxLength(450)
  1429. .HasColumnType("nvarchar(450)")
  1430. .HasColumnOrder(8);
  1431. b.Property<string>("Desc")
  1432. .IsRequired()
  1433. .HasColumnType("nvarchar(max)");
  1434. b.Property<bool>("IsDeleted")
  1435. .HasColumnType("bit")
  1436. .HasColumnOrder(7);
  1437. b.Property<string>("NameAr")
  1438. .IsRequired()
  1439. .HasMaxLength(250)
  1440. .HasColumnType("nvarchar(250)");
  1441. b.Property<string>("NameEn")
  1442. .IsRequired()
  1443. .HasMaxLength(250)
  1444. .HasColumnType("nvarchar(250)");
  1445. b.Property<DateTime?>("UpdateDate")
  1446. .HasColumnType("datetime2")
  1447. .HasColumnOrder(4);
  1448. b.Property<string>("UpdateUser")
  1449. .HasMaxLength(450)
  1450. .HasColumnType("nvarchar(450)")
  1451. .HasColumnOrder(2);
  1452. b.HasKey("Id");
  1453. b.HasIndex("CompanyId");
  1454. b.ToTable("Projects");
  1455. });
  1456. modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectTeam", b =>
  1457. {
  1458. b.Property<long>("Id")
  1459. .ValueGeneratedOnAdd()
  1460. .HasColumnType("bigint")
  1461. .HasColumnOrder(0);
  1462. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1463. b.Property<DateTime>("CreateDate")
  1464. .HasColumnType("datetime2")
  1465. .HasColumnOrder(3);
  1466. b.Property<string>("CreateUser")
  1467. .HasMaxLength(450)
  1468. .HasColumnType("nvarchar(450)")
  1469. .HasColumnOrder(1);
  1470. b.Property<long>("ProjectId")
  1471. .HasColumnType("bigint");
  1472. b.Property<long>("TeamId")
  1473. .HasColumnType("bigint");
  1474. b.Property<string>("TeamName")
  1475. .IsRequired()
  1476. .HasColumnType("nvarchar(max)");
  1477. b.Property<DateTime?>("UpdateDate")
  1478. .HasColumnType("datetime2")
  1479. .HasColumnOrder(4);
  1480. b.Property<string>("UpdateUser")
  1481. .HasMaxLength(450)
  1482. .HasColumnType("nvarchar(450)")
  1483. .HasColumnOrder(2);
  1484. b.HasKey("Id");
  1485. b.HasIndex("ProjectId");
  1486. b.ToTable("ProjectTeam");
  1487. });
  1488. modelBuilder.Entity("MTWorkHR.Core.Entities.Qualification", b =>
  1489. {
  1490. b.Property<long>("Id")
  1491. .ValueGeneratedOnAdd()
  1492. .HasColumnType("bigint")
  1493. .HasColumnOrder(0);
  1494. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1495. b.Property<string>("NameAr")
  1496. .IsRequired()
  1497. .HasMaxLength(250)
  1498. .HasColumnType("nvarchar(250)");
  1499. b.Property<string>("NameEn")
  1500. .IsRequired()
  1501. .HasMaxLength(250)
  1502. .HasColumnType("nvarchar(250)");
  1503. b.HasKey("Id");
  1504. b.ToTable("Qualifications");
  1505. b.HasData(
  1506. new
  1507. {
  1508. Id = 1L,
  1509. NameAr = "بكالوريوس",
  1510. NameEn = "BSC"
  1511. },
  1512. new
  1513. {
  1514. Id = 2L,
  1515. NameAr = "درجة الماجيستير",
  1516. NameEn = "Master"
  1517. },
  1518. new
  1519. {
  1520. Id = 3L,
  1521. NameAr = "درحة الدكتوراه",
  1522. NameEn = "Doctor"
  1523. });
  1524. });
  1525. modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
  1526. {
  1527. b.Property<long>("Id")
  1528. .ValueGeneratedOnAdd()
  1529. .HasColumnType("bigint")
  1530. .HasColumnOrder(0);
  1531. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1532. b.Property<string>("Channel")
  1533. .HasColumnType("nvarchar(max)");
  1534. b.Property<DateTime>("CreateDate")
  1535. .HasColumnType("datetime2");
  1536. b.Property<string>("CreateUser")
  1537. .IsRequired()
  1538. .HasColumnType("nvarchar(max)");
  1539. b.Property<string>("ErrorCode")
  1540. .IsRequired()
  1541. .HasColumnType("nvarchar(max)");
  1542. b.Property<string>("ErrorDescription")
  1543. .IsRequired()
  1544. .HasColumnType("nvarchar(max)");
  1545. b.Property<string>("InnerException")
  1546. .HasColumnType("nvarchar(max)");
  1547. b.Property<string>("Input")
  1548. .HasColumnType("nvarchar(max)");
  1549. b.Property<string>("Method")
  1550. .IsRequired()
  1551. .HasColumnType("nvarchar(max)");
  1552. b.Property<string>("QueryString")
  1553. .HasColumnType("nvarchar(max)");
  1554. b.Property<string>("ServerIP")
  1555. .HasColumnType("nvarchar(max)");
  1556. b.Property<string>("ServiceResponseTimeInSeconds")
  1557. .IsRequired()
  1558. .HasColumnType("nvarchar(max)");
  1559. b.Property<string>("UserIP")
  1560. .HasColumnType("nvarchar(max)");
  1561. b.Property<string>("userAgent")
  1562. .HasColumnType("nvarchar(max)");
  1563. b.HasKey("Id");
  1564. b.ToTable("RoleLogs");
  1565. });
  1566. modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
  1567. {
  1568. b.Property<long>("Id")
  1569. .ValueGeneratedOnAdd()
  1570. .HasColumnType("bigint")
  1571. .HasColumnOrder(0);
  1572. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1573. b.Property<string>("Channel")
  1574. .HasColumnType("nvarchar(max)");
  1575. b.Property<DateTime>("CreateDate")
  1576. .HasColumnType("datetime2");
  1577. b.Property<string>("CreateUser")
  1578. .IsRequired()
  1579. .HasColumnType("nvarchar(max)");
  1580. b.Property<string>("ErrorCode")
  1581. .IsRequired()
  1582. .HasColumnType("nvarchar(max)");
  1583. b.Property<string>("ErrorDescription")
  1584. .IsRequired()
  1585. .HasColumnType("nvarchar(max)");
  1586. b.Property<string>("InnerException")
  1587. .HasColumnType("nvarchar(max)");
  1588. b.Property<string>("Input")
  1589. .HasColumnType("nvarchar(max)");
  1590. b.Property<string>("Method")
  1591. .IsRequired()
  1592. .HasColumnType("nvarchar(max)");
  1593. b.Property<string>("QueryString")
  1594. .HasColumnType("nvarchar(max)");
  1595. b.Property<string>("ServerIP")
  1596. .HasColumnType("nvarchar(max)");
  1597. b.Property<string>("ServiceResponseTimeInSeconds")
  1598. .IsRequired()
  1599. .HasColumnType("nvarchar(max)");
  1600. b.Property<string>("UserIP")
  1601. .HasColumnType("nvarchar(max)");
  1602. b.Property<string>("userAgent")
  1603. .HasColumnType("nvarchar(max)");
  1604. b.HasKey("Id");
  1605. b.ToTable("SettingLogs");
  1606. });
  1607. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  1608. {
  1609. b.Property<long>("Id")
  1610. .ValueGeneratedOnAdd()
  1611. .HasColumnType("bigint")
  1612. .HasColumnOrder(0);
  1613. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1614. b.Property<long>("CompanyId")
  1615. .HasColumnType("bigint");
  1616. b.Property<DateTime>("CreateDate")
  1617. .HasColumnType("datetime2")
  1618. .HasColumnOrder(3);
  1619. b.Property<string>("CreateUser")
  1620. .HasMaxLength(450)
  1621. .HasColumnType("nvarchar(450)")
  1622. .HasColumnOrder(1);
  1623. b.Property<string>("DeleteUserId")
  1624. .HasMaxLength(450)
  1625. .HasColumnType("nvarchar(450)")
  1626. .HasColumnOrder(8);
  1627. b.Property<bool>("IsDeleted")
  1628. .HasColumnType("bit")
  1629. .HasColumnOrder(7);
  1630. b.Property<string>("NameAr")
  1631. .IsRequired()
  1632. .HasMaxLength(250)
  1633. .HasColumnType("nvarchar(250)");
  1634. b.Property<string>("NameEn")
  1635. .IsRequired()
  1636. .HasMaxLength(250)
  1637. .HasColumnType("nvarchar(250)");
  1638. b.Property<DateTime?>("UpdateDate")
  1639. .HasColumnType("datetime2")
  1640. .HasColumnOrder(4);
  1641. b.Property<string>("UpdateUser")
  1642. .HasMaxLength(450)
  1643. .HasColumnType("nvarchar(450)")
  1644. .HasColumnOrder(2);
  1645. b.HasKey("Id");
  1646. b.HasIndex("CompanyId");
  1647. b.ToTable("Teams");
  1648. });
  1649. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamLog", b =>
  1650. {
  1651. b.Property<long>("Id")
  1652. .ValueGeneratedOnAdd()
  1653. .HasColumnType("bigint")
  1654. .HasColumnOrder(0);
  1655. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1656. b.Property<string>("Channel")
  1657. .HasColumnType("nvarchar(max)");
  1658. b.Property<DateTime>("CreateDate")
  1659. .HasColumnType("datetime2");
  1660. b.Property<string>("CreateUser")
  1661. .IsRequired()
  1662. .HasColumnType("nvarchar(max)");
  1663. b.Property<string>("ErrorCode")
  1664. .IsRequired()
  1665. .HasColumnType("nvarchar(max)");
  1666. b.Property<string>("ErrorDescription")
  1667. .IsRequired()
  1668. .HasColumnType("nvarchar(max)");
  1669. b.Property<string>("InnerException")
  1670. .HasColumnType("nvarchar(max)");
  1671. b.Property<string>("Input")
  1672. .HasColumnType("nvarchar(max)");
  1673. b.Property<string>("Method")
  1674. .IsRequired()
  1675. .HasColumnType("nvarchar(max)");
  1676. b.Property<string>("QueryString")
  1677. .HasColumnType("nvarchar(max)");
  1678. b.Property<string>("ServerIP")
  1679. .HasColumnType("nvarchar(max)");
  1680. b.Property<string>("ServiceResponseTimeInSeconds")
  1681. .IsRequired()
  1682. .HasColumnType("nvarchar(max)");
  1683. b.Property<string>("UserIP")
  1684. .HasColumnType("nvarchar(max)");
  1685. b.Property<string>("userAgent")
  1686. .HasColumnType("nvarchar(max)");
  1687. b.HasKey("Id");
  1688. b.ToTable("TeamLogs");
  1689. });
  1690. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  1691. {
  1692. b.Property<long>("Id")
  1693. .ValueGeneratedOnAdd()
  1694. .HasColumnType("bigint")
  1695. .HasColumnOrder(0);
  1696. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1697. b.Property<string>("AssignedUserId")
  1698. .IsRequired()
  1699. .HasColumnType("nvarchar(max)");
  1700. b.Property<string>("AssignedUserName")
  1701. .IsRequired()
  1702. .HasColumnType("nvarchar(max)");
  1703. b.Property<DateTime>("CreateDate")
  1704. .HasColumnType("datetime2")
  1705. .HasColumnOrder(3);
  1706. b.Property<string>("CreateUser")
  1707. .HasMaxLength(450)
  1708. .HasColumnType("nvarchar(450)")
  1709. .HasColumnOrder(1);
  1710. b.Property<bool>("IsAdmin")
  1711. .HasColumnType("bit");
  1712. b.Property<long>("TeamId")
  1713. .HasColumnType("bigint");
  1714. b.Property<DateTime?>("UpdateDate")
  1715. .HasColumnType("datetime2")
  1716. .HasColumnOrder(4);
  1717. b.Property<string>("UpdateUser")
  1718. .HasMaxLength(450)
  1719. .HasColumnType("nvarchar(450)")
  1720. .HasColumnOrder(2);
  1721. b.HasKey("Id");
  1722. b.HasIndex("TeamId");
  1723. b.ToTable("TeamUser");
  1724. });
  1725. modelBuilder.Entity("MTWorkHR.Core.Entities.University", b =>
  1726. {
  1727. b.Property<long>("Id")
  1728. .ValueGeneratedOnAdd()
  1729. .HasColumnType("bigint")
  1730. .HasColumnOrder(0);
  1731. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1732. b.Property<string>("NameAr")
  1733. .IsRequired()
  1734. .HasMaxLength(250)
  1735. .HasColumnType("nvarchar(250)");
  1736. b.Property<string>("NameEn")
  1737. .IsRequired()
  1738. .HasMaxLength(250)
  1739. .HasColumnType("nvarchar(250)");
  1740. b.HasKey("Id");
  1741. b.ToTable("Universities");
  1742. b.HasData(
  1743. new
  1744. {
  1745. Id = 1L,
  1746. NameAr = "جامعة الملك فهد",
  1747. NameEn = "Fahd Univ"
  1748. },
  1749. new
  1750. {
  1751. Id = 2L,
  1752. NameAr = "جامعة الرياض",
  1753. NameEn = "Riydh Univ"
  1754. },
  1755. new
  1756. {
  1757. Id = 3L,
  1758. NameAr = "جامعة جدة",
  1759. NameEn = "Geda Univ"
  1760. });
  1761. });
  1762. modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
  1763. {
  1764. b.Property<long>("Id")
  1765. .ValueGeneratedOnAdd()
  1766. .HasColumnType("bigint")
  1767. .HasColumnOrder(0);
  1768. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1769. b.Property<int?>("CityId")
  1770. .HasColumnType("int");
  1771. b.Property<long>("CompanyId")
  1772. .HasColumnType("bigint");
  1773. b.Property<int?>("CountryId")
  1774. .HasColumnType("int");
  1775. b.Property<DateTime>("CreateDate")
  1776. .HasColumnType("datetime2")
  1777. .HasColumnOrder(3);
  1778. b.Property<string>("CreateUser")
  1779. .HasMaxLength(450)
  1780. .HasColumnType("nvarchar(450)")
  1781. .HasColumnOrder(1);
  1782. b.Property<string>("DeleteUserId")
  1783. .HasMaxLength(450)
  1784. .HasColumnType("nvarchar(450)")
  1785. .HasColumnOrder(8);
  1786. b.Property<DateTime?>("EndDate")
  1787. .HasColumnType("datetime2");
  1788. b.Property<bool>("IsDeleted")
  1789. .HasColumnType("bit")
  1790. .HasColumnOrder(7);
  1791. b.Property<long?>("LeaveTypeId")
  1792. .HasColumnType("bigint");
  1793. b.Property<int?>("OrderStatus")
  1794. .HasColumnType("int");
  1795. b.Property<long>("OrderTypeId")
  1796. .HasColumnType("bigint");
  1797. b.Property<string>("RequestComments")
  1798. .HasColumnType("nvarchar(max)");
  1799. b.Property<string>("RequestingEmployeeId")
  1800. .IsRequired()
  1801. .HasColumnType("nvarchar(max)");
  1802. b.Property<DateTime>("StartDate")
  1803. .HasColumnType("datetime2");
  1804. b.Property<DateTime?>("UpdateDate")
  1805. .HasColumnType("datetime2")
  1806. .HasColumnOrder(4);
  1807. b.Property<string>("UpdateUser")
  1808. .HasMaxLength(450)
  1809. .HasColumnType("nvarchar(450)")
  1810. .HasColumnOrder(2);
  1811. b.HasKey("Id");
  1812. b.HasIndex("CompanyId");
  1813. b.HasIndex("LeaveTypeId");
  1814. b.HasIndex("OrderTypeId");
  1815. b.ToTable("OrderRequests");
  1816. });
  1817. modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
  1818. {
  1819. b.Property<long>("Id")
  1820. .ValueGeneratedOnAdd()
  1821. .HasColumnType("bigint")
  1822. .HasColumnOrder(0);
  1823. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1824. b.Property<string>("Channel")
  1825. .HasColumnType("nvarchar(max)");
  1826. b.Property<DateTime>("CreateDate")
  1827. .HasColumnType("datetime2");
  1828. b.Property<string>("CreateUser")
  1829. .IsRequired()
  1830. .HasColumnType("nvarchar(max)");
  1831. b.Property<string>("ErrorCode")
  1832. .IsRequired()
  1833. .HasColumnType("nvarchar(max)");
  1834. b.Property<string>("ErrorDescription")
  1835. .IsRequired()
  1836. .HasColumnType("nvarchar(max)");
  1837. b.Property<string>("InnerException")
  1838. .HasColumnType("nvarchar(max)");
  1839. b.Property<string>("Input")
  1840. .HasColumnType("nvarchar(max)");
  1841. b.Property<string>("Method")
  1842. .IsRequired()
  1843. .HasColumnType("nvarchar(max)");
  1844. b.Property<string>("QueryString")
  1845. .HasColumnType("nvarchar(max)");
  1846. b.Property<string>("ServerIP")
  1847. .HasColumnType("nvarchar(max)");
  1848. b.Property<string>("ServiceResponseTimeInSeconds")
  1849. .IsRequired()
  1850. .HasColumnType("nvarchar(max)");
  1851. b.Property<string>("UserIP")
  1852. .HasColumnType("nvarchar(max)");
  1853. b.Property<string>("userAgent")
  1854. .HasColumnType("nvarchar(max)");
  1855. b.HasKey("Id");
  1856. b.ToTable("UserLogs");
  1857. });
  1858. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  1859. {
  1860. b.Property<long>("Id")
  1861. .ValueGeneratedOnAdd()
  1862. .HasColumnType("bigint")
  1863. .HasColumnOrder(0);
  1864. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1865. b.Property<string>("AssignedUserId")
  1866. .IsRequired()
  1867. .HasColumnType("nvarchar(max)");
  1868. b.Property<long>("CompanyId")
  1869. .HasColumnType("bigint");
  1870. b.Property<DateTime>("CreateDate")
  1871. .HasColumnType("datetime2")
  1872. .HasColumnOrder(3);
  1873. b.Property<string>("CreateUser")
  1874. .HasMaxLength(450)
  1875. .HasColumnType("nvarchar(450)")
  1876. .HasColumnOrder(1);
  1877. b.Property<string>("DeleteUserId")
  1878. .HasMaxLength(450)
  1879. .HasColumnType("nvarchar(450)")
  1880. .HasColumnOrder(8);
  1881. b.Property<string>("Description")
  1882. .IsRequired()
  1883. .HasColumnType("nvarchar(max)");
  1884. b.Property<DateTime>("DueDate")
  1885. .HasColumnType("datetime2");
  1886. b.Property<bool>("IsDeleted")
  1887. .HasColumnType("bit")
  1888. .HasColumnOrder(7);
  1889. b.Property<int>("Priority")
  1890. .HasColumnType("int");
  1891. b.Property<long>("ProjectId")
  1892. .HasColumnType("bigint");
  1893. b.Property<long>("StatusId")
  1894. .HasColumnType("bigint");
  1895. b.Property<string>("Title")
  1896. .IsRequired()
  1897. .HasColumnType("nvarchar(max)");
  1898. b.Property<DateTime?>("UpdateDate")
  1899. .HasColumnType("datetime2")
  1900. .HasColumnOrder(4);
  1901. b.Property<string>("UpdateUser")
  1902. .HasMaxLength(450)
  1903. .HasColumnType("nvarchar(450)")
  1904. .HasColumnOrder(2);
  1905. b.HasKey("Id");
  1906. b.HasIndex("CompanyId");
  1907. b.HasIndex("ProjectId");
  1908. b.HasIndex("StatusId");
  1909. b.ToTable("UserTasks");
  1910. });
  1911. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  1912. {
  1913. b.Property<long>("Id")
  1914. .ValueGeneratedOnAdd()
  1915. .HasColumnType("bigint")
  1916. .HasColumnOrder(0);
  1917. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1918. b.Property<long?>("AttachmentTypeId")
  1919. .HasColumnType("bigint");
  1920. b.Property<DateTime>("CreateDate")
  1921. .HasColumnType("datetime2")
  1922. .HasColumnOrder(3);
  1923. b.Property<string>("CreateUser")
  1924. .HasMaxLength(450)
  1925. .HasColumnType("nvarchar(450)")
  1926. .HasColumnOrder(1);
  1927. b.Property<string>("FileName")
  1928. .HasMaxLength(250)
  1929. .HasColumnType("nvarchar(250)");
  1930. b.Property<string>("OriginalName")
  1931. .HasMaxLength(250)
  1932. .HasColumnType("nvarchar(250)");
  1933. b.Property<long>("TaskId")
  1934. .HasColumnType("bigint");
  1935. b.Property<DateTime?>("UpdateDate")
  1936. .HasColumnType("datetime2")
  1937. .HasColumnOrder(4);
  1938. b.Property<string>("UpdateUser")
  1939. .HasMaxLength(450)
  1940. .HasColumnType("nvarchar(450)")
  1941. .HasColumnOrder(2);
  1942. b.HasKey("Id");
  1943. b.HasIndex("AttachmentTypeId");
  1944. b.HasIndex("TaskId");
  1945. b.ToTable("UserTaskAttachments");
  1946. });
  1947. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  1948. {
  1949. b.Property<long>("Id")
  1950. .ValueGeneratedOnAdd()
  1951. .HasColumnType("bigint")
  1952. .HasColumnOrder(0);
  1953. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1954. b.Property<long>("AssignedToUserId")
  1955. .HasColumnType("bigint");
  1956. b.Property<string>("Comment")
  1957. .HasMaxLength(500)
  1958. .HasColumnType("nvarchar(500)");
  1959. b.Property<DateTime>("CreateDate")
  1960. .HasColumnType("datetime2")
  1961. .HasColumnOrder(3);
  1962. b.Property<string>("CreateUser")
  1963. .HasMaxLength(450)
  1964. .HasColumnType("nvarchar(450)")
  1965. .HasColumnOrder(1);
  1966. b.Property<long>("CurrentStatusId")
  1967. .HasColumnType("bigint");
  1968. b.Property<bool>("IsDeleted")
  1969. .HasColumnType("bit");
  1970. b.Property<long>("TaskId")
  1971. .HasColumnType("bigint");
  1972. b.Property<DateTime?>("UpdateDate")
  1973. .HasColumnType("datetime2")
  1974. .HasColumnOrder(4);
  1975. b.Property<string>("UpdateUser")
  1976. .HasMaxLength(450)
  1977. .HasColumnType("nvarchar(450)")
  1978. .HasColumnOrder(2);
  1979. b.Property<long?>("UserTaskId")
  1980. .HasColumnType("bigint");
  1981. b.HasKey("Id");
  1982. b.HasIndex("CurrentStatusId");
  1983. b.HasIndex("UserTaskId");
  1984. b.ToTable("UserTaskHistories");
  1985. });
  1986. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskLog", b =>
  1987. {
  1988. b.Property<long>("Id")
  1989. .ValueGeneratedOnAdd()
  1990. .HasColumnType("bigint")
  1991. .HasColumnOrder(0);
  1992. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1993. b.Property<string>("Channel")
  1994. .HasColumnType("nvarchar(max)");
  1995. b.Property<DateTime>("CreateDate")
  1996. .HasColumnType("datetime2");
  1997. b.Property<string>("CreateUser")
  1998. .IsRequired()
  1999. .HasColumnType("nvarchar(max)");
  2000. b.Property<string>("ErrorCode")
  2001. .IsRequired()
  2002. .HasColumnType("nvarchar(max)");
  2003. b.Property<string>("ErrorDescription")
  2004. .IsRequired()
  2005. .HasColumnType("nvarchar(max)");
  2006. b.Property<string>("InnerException")
  2007. .HasColumnType("nvarchar(max)");
  2008. b.Property<string>("Input")
  2009. .HasColumnType("nvarchar(max)");
  2010. b.Property<string>("Method")
  2011. .IsRequired()
  2012. .HasColumnType("nvarchar(max)");
  2013. b.Property<string>("QueryString")
  2014. .HasColumnType("nvarchar(max)");
  2015. b.Property<string>("ServerIP")
  2016. .HasColumnType("nvarchar(max)");
  2017. b.Property<string>("ServiceResponseTimeInSeconds")
  2018. .IsRequired()
  2019. .HasColumnType("nvarchar(max)");
  2020. b.Property<string>("UserIP")
  2021. .HasColumnType("nvarchar(max)");
  2022. b.Property<string>("userAgent")
  2023. .HasColumnType("nvarchar(max)");
  2024. b.HasKey("Id");
  2025. b.ToTable("UserTaskLogs");
  2026. });
  2027. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
  2028. {
  2029. b.Property<long>("Id")
  2030. .ValueGeneratedOnAdd()
  2031. .HasColumnType("bigint")
  2032. .HasColumnOrder(0);
  2033. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  2034. b.Property<string>("NameAr")
  2035. .IsRequired()
  2036. .HasMaxLength(250)
  2037. .HasColumnType("nvarchar(250)");
  2038. b.Property<string>("NameEn")
  2039. .IsRequired()
  2040. .HasMaxLength(250)
  2041. .HasColumnType("nvarchar(250)");
  2042. b.HasKey("Id");
  2043. b.ToTable("UserTaskStatuses");
  2044. b.HasData(
  2045. new
  2046. {
  2047. Id = 1L,
  2048. NameAr = "جديدة",
  2049. NameEn = "To Do"
  2050. },
  2051. new
  2052. {
  2053. Id = 2L,
  2054. NameAr = "قيد العمل",
  2055. NameEn = "In progress"
  2056. },
  2057. new
  2058. {
  2059. Id = 3L,
  2060. NameAr = "تحتاج مراجعة",
  2061. NameEn = "Need Review"
  2062. },
  2063. new
  2064. {
  2065. Id = 4L,
  2066. NameAr = "تمت",
  2067. NameEn = "Done"
  2068. });
  2069. });
  2070. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  2071. {
  2072. b.Property<string>("Id")
  2073. .HasColumnType("nvarchar(450)");
  2074. b.Property<string>("ConcurrencyStamp")
  2075. .IsConcurrencyToken()
  2076. .HasColumnType("nvarchar(max)");
  2077. b.Property<DateTime>("CreateDate")
  2078. .HasColumnType("datetime2");
  2079. b.Property<string>("CreateUser")
  2080. .HasColumnType("nvarchar(max)");
  2081. b.Property<string>("DeleteUserId")
  2082. .HasColumnType("nvarchar(max)");
  2083. b.Property<bool?>("IsAdmin")
  2084. .HasColumnType("bit");
  2085. b.Property<bool>("IsDeleted")
  2086. .HasColumnType("bit");
  2087. b.Property<string>("Name")
  2088. .HasMaxLength(256)
  2089. .HasColumnType("nvarchar(256)");
  2090. b.Property<string>("NormalizedName")
  2091. .HasMaxLength(256)
  2092. .HasColumnType("nvarchar(256)");
  2093. b.Property<DateTime?>("UpdateDate")
  2094. .HasColumnType("datetime2");
  2095. b.Property<string>("UpdateUser")
  2096. .HasColumnType("nvarchar(max)");
  2097. b.HasKey("Id");
  2098. b.HasIndex("NormalizedName")
  2099. .IsUnique()
  2100. .HasDatabaseName("RoleNameIndex")
  2101. .HasFilter("[NormalizedName] IS NOT NULL");
  2102. b.ToTable("AspNetRoles", (string)null);
  2103. b.HasData(
  2104. new
  2105. {
  2106. Id = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A",
  2107. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  2108. IsAdmin = true,
  2109. IsDeleted = false,
  2110. Name = "Admin",
  2111. NormalizedName = "ADMIN"
  2112. },
  2113. new
  2114. {
  2115. Id = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E",
  2116. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  2117. IsAdmin = false,
  2118. IsDeleted = false,
  2119. Name = "Employee",
  2120. NormalizedName = "EMPLOYEE"
  2121. },
  2122. new
  2123. {
  2124. Id = "CO5B3B92-2311-48F8-9DEC-F9FAEF1F211R",
  2125. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  2126. IsAdmin = false,
  2127. IsDeleted = false,
  2128. Name = "Contractor",
  2129. NormalizedName = "CONTRACTOR"
  2130. });
  2131. });
  2132. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  2133. {
  2134. b.Property<string>("Id")
  2135. .HasColumnType("nvarchar(450)");
  2136. b.Property<int>("AccessFailedCount")
  2137. .HasColumnType("int");
  2138. b.Property<long?>("CompanyId")
  2139. .HasColumnType("bigint");
  2140. b.Property<string>("ConcurrencyStamp")
  2141. .IsConcurrencyToken()
  2142. .HasColumnType("nvarchar(max)");
  2143. b.Property<long?>("CountryId")
  2144. .HasColumnType("bigint");
  2145. b.Property<string>("CreateUser")
  2146. .HasColumnType("nvarchar(max)");
  2147. b.Property<DateTime>("DateOfBirth")
  2148. .HasColumnType("datetime2");
  2149. b.Property<string>("DeleteUserId")
  2150. .HasColumnType("nvarchar(max)");
  2151. b.Property<string>("Email")
  2152. .HasMaxLength(256)
  2153. .HasColumnType("nvarchar(256)");
  2154. b.Property<bool>("EmailConfirmed")
  2155. .HasColumnType("bit");
  2156. b.Property<string>("FavoriteName")
  2157. .HasColumnType("nvarchar(max)");
  2158. b.Property<string>("FirstName")
  2159. .IsRequired()
  2160. .HasColumnType("nvarchar(max)");
  2161. b.Property<string>("IdNumber")
  2162. .IsRequired()
  2163. .HasColumnType("nvarchar(max)");
  2164. b.Property<decimal?>("IncomeTaxValue")
  2165. .HasColumnType("decimal(18,2)");
  2166. b.Property<long?>("IndustryId")
  2167. .HasColumnType("bigint");
  2168. b.Property<bool>("IsDeleted")
  2169. .HasColumnType("bit");
  2170. b.Property<bool>("IsStopped")
  2171. .HasColumnType("bit");
  2172. b.Property<long?>("JobTitleId")
  2173. .HasColumnType("bigint");
  2174. b.Property<string>("LastName")
  2175. .IsRequired()
  2176. .HasColumnType("nvarchar(max)");
  2177. b.Property<string>("LinkedInLink")
  2178. .HasColumnType("nvarchar(max)");
  2179. b.Property<bool>("LockoutEnabled")
  2180. .HasColumnType("bit");
  2181. b.Property<DateTimeOffset?>("LockoutEnd")
  2182. .HasColumnType("datetimeoffset");
  2183. b.Property<string>("ManagerId")
  2184. .HasColumnType("nvarchar(450)");
  2185. b.Property<string>("NormalizedEmail")
  2186. .HasMaxLength(256)
  2187. .HasColumnType("nvarchar(256)");
  2188. b.Property<string>("NormalizedUserName")
  2189. .HasMaxLength(256)
  2190. .HasColumnType("nvarchar(256)");
  2191. b.Property<string>("PassportNumber")
  2192. .IsRequired()
  2193. .HasColumnType("nvarchar(max)");
  2194. b.Property<string>("PasswordHash")
  2195. .HasColumnType("nvarchar(max)");
  2196. b.Property<string>("PhoneNumber")
  2197. .HasColumnType("nvarchar(max)");
  2198. b.Property<bool>("PhoneNumberConfirmed")
  2199. .HasColumnType("bit");
  2200. b.Property<long?>("QualificationId")
  2201. .HasColumnType("bigint");
  2202. b.Property<string>("SecurityStamp")
  2203. .HasColumnType("nvarchar(max)");
  2204. b.Property<decimal?>("TaxNumber")
  2205. .HasColumnType("decimal(18,2)");
  2206. b.Property<bool>("TwoFactorEnabled")
  2207. .HasColumnType("bit");
  2208. b.Property<long?>("UniversityId")
  2209. .HasColumnType("bigint");
  2210. b.Property<string>("UpdateUser")
  2211. .HasColumnType("nvarchar(max)");
  2212. b.Property<string>("UserName")
  2213. .HasMaxLength(256)
  2214. .HasColumnType("nvarchar(256)");
  2215. b.Property<int>("UserType")
  2216. .HasColumnType("int");
  2217. b.HasKey("Id");
  2218. b.HasIndex("CountryId");
  2219. b.HasIndex("IndustryId");
  2220. b.HasIndex("JobTitleId");
  2221. b.HasIndex("ManagerId");
  2222. b.HasIndex("NormalizedEmail")
  2223. .HasDatabaseName("EmailIndex");
  2224. b.HasIndex("NormalizedUserName")
  2225. .IsUnique()
  2226. .HasDatabaseName("UserNameIndex")
  2227. .HasFilter("[NormalizedUserName] IS NOT NULL");
  2228. b.HasIndex("QualificationId");
  2229. b.HasIndex("UniversityId");
  2230. b.ToTable("AspNetUsers", (string)null);
  2231. b.HasData(
  2232. new
  2233. {
  2234. Id = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  2235. AccessFailedCount = 0,
  2236. CompanyId = 1L,
  2237. ConcurrencyStamp = "7cc87689-9eab-4280-b8e3-1834080783a5",
  2238. DateOfBirth = new DateTime(2000, 2, 10, 0, 0, 0, 0, DateTimeKind.Unspecified),
  2239. Email = "a@b.com",
  2240. EmailConfirmed = true,
  2241. FirstName = "Zinab",
  2242. IdNumber = "123",
  2243. IncomeTaxValue = 1m,
  2244. IsDeleted = false,
  2245. IsStopped = false,
  2246. LastName = "Elgendy",
  2247. LockoutEnabled = false,
  2248. NormalizedEmail = "A@B.COM",
  2249. NormalizedUserName = "A@B.COM",
  2250. PassportNumber = "1234567",
  2251. PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
  2252. PhoneNumber = "1234567890",
  2253. PhoneNumberConfirmed = true,
  2254. SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
  2255. TaxNumber = 111m,
  2256. TwoFactorEnabled = false,
  2257. UserName = "A@b.com",
  2258. UserType = 1
  2259. },
  2260. new
  2261. {
  2262. Id = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  2263. AccessFailedCount = 0,
  2264. CompanyId = 1L,
  2265. ConcurrencyStamp = "4af7b4cf-802a-455b-b598-997e167745b3",
  2266. DateOfBirth = new DateTime(2001, 5, 13, 0, 0, 0, 0, DateTimeKind.Unspecified),
  2267. Email = "ali@b.com",
  2268. EmailConfirmed = true,
  2269. FirstName = "Ali",
  2270. IdNumber = "343434",
  2271. IncomeTaxValue = 100m,
  2272. IsDeleted = false,
  2273. IsStopped = false,
  2274. LastName = "Farok",
  2275. LockoutEnabled = false,
  2276. NormalizedEmail = "ALI@B.COM",
  2277. NormalizedUserName = "ALI@B.COM",
  2278. PassportNumber = "7654321001010",
  2279. PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
  2280. PhoneNumber = "1234567888",
  2281. PhoneNumberConfirmed = true,
  2282. SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
  2283. TaxNumber = 222m,
  2284. TwoFactorEnabled = false,
  2285. UserName = "Ali@b.com",
  2286. UserType = 1
  2287. });
  2288. });
  2289. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  2290. {
  2291. b.Property<long>("Id")
  2292. .ValueGeneratedOnAdd()
  2293. .HasColumnType("bigint")
  2294. .HasColumnOrder(0);
  2295. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  2296. b.Property<long>("PermissionId")
  2297. .HasColumnType("bigint");
  2298. b.Property<string>("PermissionName")
  2299. .IsRequired()
  2300. .HasColumnType("nvarchar(max)");
  2301. b.Property<string>("RoleId")
  2302. .IsRequired()
  2303. .HasColumnType("nvarchar(450)");
  2304. b.HasKey("Id");
  2305. b.HasIndex("PermissionId");
  2306. b.HasIndex("RoleId");
  2307. b.ToTable("RolePermissions");
  2308. });
  2309. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  2310. {
  2311. b.Property<long>("Id")
  2312. .ValueGeneratedOnAdd()
  2313. .HasColumnType("bigint")
  2314. .HasColumnOrder(0);
  2315. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  2316. b.Property<string>("AddressDesc")
  2317. .HasColumnType("nvarchar(max)");
  2318. b.Property<long?>("CityId")
  2319. .HasColumnType("bigint");
  2320. b.Property<long?>("CountryId")
  2321. .HasColumnType("bigint");
  2322. b.Property<DateTime>("CreateDate")
  2323. .HasColumnType("datetime2")
  2324. .HasColumnOrder(3);
  2325. b.Property<string>("CreateUser")
  2326. .HasMaxLength(450)
  2327. .HasColumnType("nvarchar(450)")
  2328. .HasColumnOrder(1);
  2329. b.Property<string>("PostalCode")
  2330. .HasColumnType("nvarchar(max)");
  2331. b.Property<DateTime?>("UpdateDate")
  2332. .HasColumnType("datetime2")
  2333. .HasColumnOrder(4);
  2334. b.Property<string>("UpdateUser")
  2335. .HasMaxLength(450)
  2336. .HasColumnType("nvarchar(450)")
  2337. .HasColumnOrder(2);
  2338. b.Property<string>("UserId")
  2339. .IsRequired()
  2340. .HasColumnType("nvarchar(450)");
  2341. b.HasKey("Id");
  2342. b.HasIndex("CityId");
  2343. b.HasIndex("CountryId");
  2344. b.HasIndex("UserId")
  2345. .IsUnique();
  2346. b.ToTable("UserAddress");
  2347. });
  2348. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  2349. {
  2350. b.Property<long>("Id")
  2351. .ValueGeneratedOnAdd()
  2352. .HasColumnType("bigint")
  2353. .HasColumnOrder(0);
  2354. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  2355. b.Property<long>("AttachmentTypeId")
  2356. .HasColumnType("bigint");
  2357. b.Property<byte[]>("Content")
  2358. .IsRequired()
  2359. .HasColumnType("varbinary(max)");
  2360. b.Property<string>("ContentType")
  2361. .HasColumnType("nvarchar(max)");
  2362. b.Property<DateTime>("CreateDate")
  2363. .HasColumnType("datetime2")
  2364. .HasColumnOrder(3);
  2365. b.Property<string>("CreateUser")
  2366. .HasMaxLength(450)
  2367. .HasColumnType("nvarchar(450)")
  2368. .HasColumnOrder(1);
  2369. b.Property<string>("FileName")
  2370. .IsRequired()
  2371. .HasMaxLength(250)
  2372. .HasColumnType("nvarchar(250)");
  2373. b.Property<string>("FilePath")
  2374. .HasColumnType("nvarchar(max)");
  2375. b.Property<string>("OriginalName")
  2376. .IsRequired()
  2377. .HasMaxLength(250)
  2378. .HasColumnType("nvarchar(250)");
  2379. b.Property<DateTime?>("UpdateDate")
  2380. .HasColumnType("datetime2")
  2381. .HasColumnOrder(4);
  2382. b.Property<string>("UpdateUser")
  2383. .HasMaxLength(450)
  2384. .HasColumnType("nvarchar(450)")
  2385. .HasColumnOrder(2);
  2386. b.Property<string>("UserId")
  2387. .IsRequired()
  2388. .HasColumnType("nvarchar(450)");
  2389. b.HasKey("Id");
  2390. b.HasIndex("AttachmentTypeId");
  2391. b.HasIndex("UserId");
  2392. b.ToTable("UserAttachments");
  2393. });
  2394. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  2395. {
  2396. b.Property<int>("Id")
  2397. .ValueGeneratedOnAdd()
  2398. .HasColumnType("int");
  2399. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  2400. b.Property<string>("ClaimType")
  2401. .HasColumnType("nvarchar(max)");
  2402. b.Property<string>("ClaimValue")
  2403. .HasColumnType("nvarchar(max)");
  2404. b.Property<string>("RoleId")
  2405. .IsRequired()
  2406. .HasColumnType("nvarchar(450)");
  2407. b.HasKey("Id");
  2408. b.HasIndex("RoleId");
  2409. b.ToTable("AspNetRoleClaims", (string)null);
  2410. });
  2411. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  2412. {
  2413. b.Property<int>("Id")
  2414. .ValueGeneratedOnAdd()
  2415. .HasColumnType("int");
  2416. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  2417. b.Property<string>("ClaimType")
  2418. .HasColumnType("nvarchar(max)");
  2419. b.Property<string>("ClaimValue")
  2420. .HasColumnType("nvarchar(max)");
  2421. b.Property<string>("UserId")
  2422. .IsRequired()
  2423. .HasColumnType("nvarchar(450)");
  2424. b.HasKey("Id");
  2425. b.HasIndex("UserId");
  2426. b.ToTable("AspNetUserClaims", (string)null);
  2427. });
  2428. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  2429. {
  2430. b.Property<string>("LoginProvider")
  2431. .HasColumnType("nvarchar(450)");
  2432. b.Property<string>("ProviderKey")
  2433. .HasColumnType("nvarchar(450)");
  2434. b.Property<string>("ProviderDisplayName")
  2435. .HasColumnType("nvarchar(max)");
  2436. b.Property<string>("UserId")
  2437. .IsRequired()
  2438. .HasColumnType("nvarchar(450)");
  2439. b.HasKey("LoginProvider", "ProviderKey");
  2440. b.HasIndex("UserId");
  2441. b.ToTable("AspNetUserLogins", (string)null);
  2442. });
  2443. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  2444. {
  2445. b.Property<string>("UserId")
  2446. .HasColumnType("nvarchar(450)");
  2447. b.Property<string>("RoleId")
  2448. .HasColumnType("nvarchar(450)");
  2449. b.HasKey("UserId", "RoleId");
  2450. b.HasIndex("RoleId");
  2451. b.ToTable("AspNetUserRoles", (string)null);
  2452. b.HasData(
  2453. new
  2454. {
  2455. UserId = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  2456. RoleId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A"
  2457. },
  2458. new
  2459. {
  2460. UserId = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  2461. RoleId = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E"
  2462. });
  2463. });
  2464. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  2465. {
  2466. b.Property<string>("UserId")
  2467. .HasColumnType("nvarchar(450)");
  2468. b.Property<string>("LoginProvider")
  2469. .HasColumnType("nvarchar(450)");
  2470. b.Property<string>("Name")
  2471. .HasColumnType("nvarchar(450)");
  2472. b.Property<string>("Value")
  2473. .HasColumnType("nvarchar(max)");
  2474. b.HasKey("UserId", "LoginProvider", "Name");
  2475. b.ToTable("AspNetUserTokens", (string)null);
  2476. });
  2477. modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
  2478. {
  2479. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  2480. .WithMany()
  2481. .HasForeignKey("UserRolesId")
  2482. .OnDelete(DeleteBehavior.Cascade)
  2483. .IsRequired();
  2484. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  2485. .WithMany()
  2486. .HasForeignKey("UsersId")
  2487. .OnDelete(DeleteBehavior.Cascade)
  2488. .IsRequired();
  2489. });
  2490. modelBuilder.Entity("MTWorkHR.Core.Entities.City", b =>
  2491. {
  2492. b.HasOne("MTWorkHR.Core.Entities.CountryLookup", "Country")
  2493. .WithMany()
  2494. .HasForeignKey("CountryId")
  2495. .OnDelete(DeleteBehavior.Cascade)
  2496. .IsRequired();
  2497. b.Navigation("Country");
  2498. });
  2499. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  2500. {
  2501. b.HasOne("MTWorkHR.Core.Entities.Meeting", "Meeting")
  2502. .WithMany("MeetingUsers")
  2503. .HasForeignKey("MeetingId")
  2504. .OnDelete(DeleteBehavior.Cascade)
  2505. .IsRequired();
  2506. b.Navigation("Meeting");
  2507. });
  2508. modelBuilder.Entity("MTWorkHR.Core.Entities.OrderAllocation", b =>
  2509. {
  2510. b.HasOne("MTWorkHR.Core.Entities.LeaveType", "LeaveType")
  2511. .WithMany()
  2512. .HasForeignKey("LeaveTypeId");
  2513. b.HasOne("MTWorkHR.Core.Entities.OrderType", "OrderType")
  2514. .WithMany()
  2515. .HasForeignKey("OrderTypeId")
  2516. .OnDelete(DeleteBehavior.Cascade)
  2517. .IsRequired();
  2518. b.Navigation("LeaveType");
  2519. b.Navigation("OrderType");
  2520. });
  2521. modelBuilder.Entity("MTWorkHR.Core.Entities.ProjectTeam", b =>
  2522. {
  2523. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  2524. .WithMany("ProjectTeams")
  2525. .HasForeignKey("ProjectId")
  2526. .OnDelete(DeleteBehavior.Cascade)
  2527. .IsRequired();
  2528. b.Navigation("Project");
  2529. });
  2530. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  2531. {
  2532. b.HasOne("MTWorkHR.Core.Entities.Team", "Team")
  2533. .WithMany("TeamUsers")
  2534. .HasForeignKey("TeamId")
  2535. .OnDelete(DeleteBehavior.Cascade)
  2536. .IsRequired();
  2537. b.Navigation("Team");
  2538. });
  2539. modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
  2540. {
  2541. b.HasOne("MTWorkHR.Core.Entities.LeaveType", "LeaveType")
  2542. .WithMany()
  2543. .HasForeignKey("LeaveTypeId");
  2544. b.HasOne("MTWorkHR.Core.Entities.OrderType", "OrderType")
  2545. .WithMany()
  2546. .HasForeignKey("OrderTypeId")
  2547. .OnDelete(DeleteBehavior.Cascade)
  2548. .IsRequired();
  2549. b.Navigation("LeaveType");
  2550. b.Navigation("OrderType");
  2551. });
  2552. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  2553. {
  2554. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  2555. .WithMany()
  2556. .HasForeignKey("ProjectId")
  2557. .OnDelete(DeleteBehavior.Cascade)
  2558. .IsRequired();
  2559. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  2560. .WithMany()
  2561. .HasForeignKey("StatusId")
  2562. .OnDelete(DeleteBehavior.Cascade)
  2563. .IsRequired();
  2564. b.Navigation("Project");
  2565. b.Navigation("TaskStatus");
  2566. });
  2567. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  2568. {
  2569. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  2570. .WithMany()
  2571. .HasForeignKey("AttachmentTypeId");
  2572. b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
  2573. .WithMany("TaskAttachments")
  2574. .HasForeignKey("TaskId")
  2575. .OnDelete(DeleteBehavior.Cascade)
  2576. .IsRequired();
  2577. b.Navigation("AttachmentType");
  2578. b.Navigation("UserTask");
  2579. });
  2580. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  2581. {
  2582. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  2583. .WithMany()
  2584. .HasForeignKey("CurrentStatusId")
  2585. .OnDelete(DeleteBehavior.Cascade)
  2586. .IsRequired();
  2587. b.HasOne("MTWorkHR.Core.Entities.UserTask", null)
  2588. .WithMany("UserTaskHistories")
  2589. .HasForeignKey("UserTaskId");
  2590. b.Navigation("TaskStatus");
  2591. });
  2592. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  2593. {
  2594. b.HasOne("MTWorkHR.Core.Entities.CountryLookup", "Country")
  2595. .WithMany()
  2596. .HasForeignKey("CountryId");
  2597. b.HasOne("MTWorkHR.Core.Entities.Industry", "Industry")
  2598. .WithMany()
  2599. .HasForeignKey("IndustryId");
  2600. b.HasOne("MTWorkHR.Core.Entities.JobTitle", "JobTitle")
  2601. .WithMany()
  2602. .HasForeignKey("JobTitleId");
  2603. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "Manager")
  2604. .WithMany()
  2605. .HasForeignKey("ManagerId");
  2606. b.HasOne("MTWorkHR.Core.Entities.Qualification", "Qualification")
  2607. .WithMany()
  2608. .HasForeignKey("QualificationId");
  2609. b.HasOne("MTWorkHR.Core.Entities.University", "University")
  2610. .WithMany()
  2611. .HasForeignKey("UniversityId");
  2612. b.Navigation("Country");
  2613. b.Navigation("Industry");
  2614. b.Navigation("JobTitle");
  2615. b.Navigation("Manager");
  2616. b.Navigation("Qualification");
  2617. b.Navigation("University");
  2618. });
  2619. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  2620. {
  2621. b.HasOne("MTWorkHR.Core.Entities.Permission", "Permission")
  2622. .WithMany()
  2623. .HasForeignKey("PermissionId")
  2624. .OnDelete(DeleteBehavior.Cascade)
  2625. .IsRequired();
  2626. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", "Role")
  2627. .WithMany("RolePermissions")
  2628. .HasForeignKey("RoleId")
  2629. .OnDelete(DeleteBehavior.Cascade)
  2630. .IsRequired();
  2631. b.Navigation("Permission");
  2632. b.Navigation("Role");
  2633. });
  2634. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  2635. {
  2636. b.HasOne("MTWorkHR.Core.Entities.City", "City")
  2637. .WithMany()
  2638. .HasForeignKey("CityId");
  2639. b.HasOne("MTWorkHR.Core.Entities.CountryLookup", "Country")
  2640. .WithMany()
  2641. .HasForeignKey("CountryId");
  2642. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  2643. .WithOne("UserAddress")
  2644. .HasForeignKey("MTWorkHR.Infrastructure.Entities.UserAddress", "UserId")
  2645. .OnDelete(DeleteBehavior.Cascade)
  2646. .IsRequired();
  2647. b.Navigation("City");
  2648. b.Navigation("Country");
  2649. b.Navigation("User");
  2650. });
  2651. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  2652. {
  2653. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  2654. .WithMany()
  2655. .HasForeignKey("AttachmentTypeId")
  2656. .OnDelete(DeleteBehavior.Cascade)
  2657. .IsRequired();
  2658. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  2659. .WithMany("UserAttachments")
  2660. .HasForeignKey("UserId")
  2661. .OnDelete(DeleteBehavior.Cascade)
  2662. .IsRequired();
  2663. b.Navigation("AttachmentType");
  2664. b.Navigation("User");
  2665. });
  2666. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  2667. {
  2668. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  2669. .WithMany()
  2670. .HasForeignKey("RoleId")
  2671. .OnDelete(DeleteBehavior.Cascade)
  2672. .IsRequired();
  2673. });
  2674. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  2675. {
  2676. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  2677. .WithMany()
  2678. .HasForeignKey("UserId")
  2679. .OnDelete(DeleteBehavior.Cascade)
  2680. .IsRequired();
  2681. });
  2682. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  2683. {
  2684. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  2685. .WithMany()
  2686. .HasForeignKey("UserId")
  2687. .OnDelete(DeleteBehavior.Cascade)
  2688. .IsRequired();
  2689. });
  2690. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  2691. {
  2692. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  2693. .WithMany()
  2694. .HasForeignKey("RoleId")
  2695. .OnDelete(DeleteBehavior.Cascade)
  2696. .IsRequired();
  2697. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  2698. .WithMany()
  2699. .HasForeignKey("UserId")
  2700. .OnDelete(DeleteBehavior.Cascade)
  2701. .IsRequired();
  2702. });
  2703. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  2704. {
  2705. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  2706. .WithMany()
  2707. .HasForeignKey("UserId")
  2708. .OnDelete(DeleteBehavior.Cascade)
  2709. .IsRequired();
  2710. });
  2711. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  2712. {
  2713. b.Navigation("MeetingUsers");
  2714. });
  2715. modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
  2716. {
  2717. b.Navigation("ProjectTeams");
  2718. });
  2719. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  2720. {
  2721. b.Navigation("TeamUsers");
  2722. });
  2723. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  2724. {
  2725. b.Navigation("TaskAttachments");
  2726. b.Navigation("UserTaskHistories");
  2727. });
  2728. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  2729. {
  2730. b.Navigation("RolePermissions");
  2731. });
  2732. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  2733. {
  2734. b.Navigation("UserAddress")
  2735. .IsRequired();
  2736. b.Navigation("UserAttachments");
  2737. });
  2738. #pragma warning restore 612, 618
  2739. }
  2740. }
  2741. }