20241015091013_contractTbls.Designer.cs 151 KB

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