HRDataContextModelSnapshot.cs 151 KB

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