20240306144054_altrTeam.Designer.cs 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838
  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("20240306144054_altrTeam")]
  14. partial class altrTeam
  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.AuthLog", 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<string>("Channel")
  42. .HasColumnType("nvarchar(max)");
  43. b.Property<DateTime>("CreateDate")
  44. .HasColumnType("datetime2");
  45. b.Property<string>("CreateUser")
  46. .IsRequired()
  47. .HasColumnType("nvarchar(max)");
  48. b.Property<string>("ErrorCode")
  49. .IsRequired()
  50. .HasColumnType("nvarchar(max)");
  51. b.Property<string>("ErrorDescription")
  52. .IsRequired()
  53. .HasColumnType("nvarchar(max)");
  54. b.Property<string>("InnerException")
  55. .HasColumnType("nvarchar(max)");
  56. b.Property<string>("Input")
  57. .HasColumnType("nvarchar(max)");
  58. b.Property<string>("Method")
  59. .IsRequired()
  60. .HasColumnType("nvarchar(max)");
  61. b.Property<string>("QueryString")
  62. .HasColumnType("nvarchar(max)");
  63. b.Property<string>("ServerIP")
  64. .HasColumnType("nvarchar(max)");
  65. b.Property<string>("ServiceResponseTimeInSeconds")
  66. .IsRequired()
  67. .HasColumnType("nvarchar(max)");
  68. b.Property<string>("UserIP")
  69. .HasColumnType("nvarchar(max)");
  70. b.Property<string>("userAgent")
  71. .HasColumnType("nvarchar(max)");
  72. b.HasKey("Id");
  73. b.ToTable("AuthLogs");
  74. });
  75. modelBuilder.Entity("MTWorkHR.Core.Entities.Base.AttachmentType", b =>
  76. {
  77. b.Property<long>("Id")
  78. .ValueGeneratedOnAdd()
  79. .HasColumnType("bigint")
  80. .HasColumnOrder(0);
  81. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  82. b.Property<bool>("IsRequired")
  83. .HasColumnType("bit");
  84. b.Property<string>("NameAr")
  85. .IsRequired()
  86. .HasMaxLength(250)
  87. .HasColumnType("nvarchar(250)");
  88. b.Property<string>("NameEn")
  89. .IsRequired()
  90. .HasMaxLength(250)
  91. .HasColumnType("nvarchar(250)");
  92. b.HasKey("Id");
  93. b.ToTable("AttachmentTypes");
  94. b.HasData(
  95. new
  96. {
  97. Id = 1L,
  98. IsRequired = false,
  99. NameAr = "السيرة الذاتية",
  100. NameEn = "CV"
  101. },
  102. new
  103. {
  104. Id = 2L,
  105. IsRequired = false,
  106. NameAr = "الهوية",
  107. NameEn = "Identification"
  108. });
  109. });
  110. modelBuilder.Entity("MTWorkHR.Core.Entities.Company", b =>
  111. {
  112. b.Property<long>("Id")
  113. .ValueGeneratedOnAdd()
  114. .HasColumnType("bigint")
  115. .HasColumnOrder(0);
  116. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  117. b.Property<string>("CRNumber")
  118. .IsRequired()
  119. .HasColumnType("nvarchar(max)");
  120. b.Property<string>("CompanyName")
  121. .IsRequired()
  122. .HasColumnType("nvarchar(max)");
  123. b.Property<DateTime>("CreateDate")
  124. .HasColumnType("datetime2")
  125. .HasColumnOrder(3);
  126. b.Property<string>("CreateUser")
  127. .HasMaxLength(450)
  128. .HasColumnType("nvarchar(450)")
  129. .HasColumnOrder(1);
  130. b.Property<bool>("IsDeleted")
  131. .HasColumnType("bit");
  132. b.Property<int>("TaxNumber")
  133. .HasColumnType("int");
  134. b.Property<DateTime?>("UpdateDate")
  135. .HasColumnType("datetime2")
  136. .HasColumnOrder(4);
  137. b.Property<string>("UpdateUser")
  138. .HasMaxLength(450)
  139. .HasColumnType("nvarchar(450)")
  140. .HasColumnOrder(2);
  141. b.Property<long>("UserId")
  142. .HasColumnType("bigint");
  143. b.HasKey("Id");
  144. b.ToTable("Companies");
  145. });
  146. modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
  147. {
  148. b.Property<long>("Id")
  149. .ValueGeneratedOnAdd()
  150. .HasColumnType("bigint")
  151. .HasColumnOrder(0);
  152. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  153. b.Property<string>("Channel")
  154. .HasColumnType("nvarchar(max)");
  155. b.Property<DateTime>("CreateDate")
  156. .HasColumnType("datetime2");
  157. b.Property<string>("CreateUser")
  158. .IsRequired()
  159. .HasColumnType("nvarchar(max)");
  160. b.Property<string>("ErrorCode")
  161. .IsRequired()
  162. .HasColumnType("nvarchar(max)");
  163. b.Property<string>("ErrorDescription")
  164. .IsRequired()
  165. .HasColumnType("nvarchar(max)");
  166. b.Property<string>("InnerException")
  167. .HasColumnType("nvarchar(max)");
  168. b.Property<string>("Input")
  169. .HasColumnType("nvarchar(max)");
  170. b.Property<string>("Method")
  171. .IsRequired()
  172. .HasColumnType("nvarchar(max)");
  173. b.Property<string>("QueryString")
  174. .HasColumnType("nvarchar(max)");
  175. b.Property<string>("ServerIP")
  176. .HasColumnType("nvarchar(max)");
  177. b.Property<string>("ServiceResponseTimeInSeconds")
  178. .IsRequired()
  179. .HasColumnType("nvarchar(max)");
  180. b.Property<string>("UserIP")
  181. .HasColumnType("nvarchar(max)");
  182. b.Property<string>("userAgent")
  183. .HasColumnType("nvarchar(max)");
  184. b.HasKey("Id");
  185. b.ToTable("FileLogs");
  186. });
  187. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  188. {
  189. b.Property<long>("Id")
  190. .ValueGeneratedOnAdd()
  191. .HasColumnType("bigint")
  192. .HasColumnOrder(0);
  193. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  194. b.Property<DateTime>("CreateDate")
  195. .HasColumnType("datetime2")
  196. .HasColumnOrder(3);
  197. b.Property<string>("CreateUser")
  198. .HasMaxLength(450)
  199. .HasColumnType("nvarchar(450)")
  200. .HasColumnOrder(1);
  201. b.Property<string>("DeleteUserId")
  202. .HasMaxLength(450)
  203. .HasColumnType("nvarchar(450)")
  204. .HasColumnOrder(8);
  205. b.Property<string>("Description")
  206. .HasMaxLength(500)
  207. .HasColumnType("nvarchar(500)");
  208. b.Property<DateTime>("EndDate")
  209. .HasColumnType("datetime2");
  210. b.Property<bool>("IsDeleted")
  211. .HasColumnType("bit")
  212. .HasColumnOrder(7);
  213. b.Property<string>("Location")
  214. .HasMaxLength(250)
  215. .HasColumnType("nvarchar(250)");
  216. b.Property<string>("MeetingLink")
  217. .HasMaxLength(250)
  218. .HasColumnType("nvarchar(250)");
  219. b.Property<DateTime>("StartDate")
  220. .HasColumnType("datetime2");
  221. b.Property<string>("Title")
  222. .IsRequired()
  223. .HasMaxLength(250)
  224. .HasColumnType("nvarchar(250)");
  225. b.Property<DateTime?>("UpdateDate")
  226. .HasColumnType("datetime2")
  227. .HasColumnOrder(4);
  228. b.Property<string>("UpdateUser")
  229. .HasMaxLength(450)
  230. .HasColumnType("nvarchar(450)")
  231. .HasColumnOrder(2);
  232. b.HasKey("Id");
  233. b.ToTable("Meetings");
  234. });
  235. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingLog", b =>
  236. {
  237. b.Property<long>("Id")
  238. .ValueGeneratedOnAdd()
  239. .HasColumnType("bigint")
  240. .HasColumnOrder(0);
  241. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  242. b.Property<string>("Channel")
  243. .HasColumnType("nvarchar(max)");
  244. b.Property<DateTime>("CreateDate")
  245. .HasColumnType("datetime2");
  246. b.Property<string>("CreateUser")
  247. .IsRequired()
  248. .HasColumnType("nvarchar(max)");
  249. b.Property<string>("ErrorCode")
  250. .IsRequired()
  251. .HasColumnType("nvarchar(max)");
  252. b.Property<string>("ErrorDescription")
  253. .IsRequired()
  254. .HasColumnType("nvarchar(max)");
  255. b.Property<string>("InnerException")
  256. .HasColumnType("nvarchar(max)");
  257. b.Property<string>("Input")
  258. .HasColumnType("nvarchar(max)");
  259. b.Property<string>("Method")
  260. .IsRequired()
  261. .HasColumnType("nvarchar(max)");
  262. b.Property<string>("QueryString")
  263. .HasColumnType("nvarchar(max)");
  264. b.Property<string>("ServerIP")
  265. .HasColumnType("nvarchar(max)");
  266. b.Property<string>("ServiceResponseTimeInSeconds")
  267. .IsRequired()
  268. .HasColumnType("nvarchar(max)");
  269. b.Property<string>("UserIP")
  270. .HasColumnType("nvarchar(max)");
  271. b.Property<string>("userAgent")
  272. .HasColumnType("nvarchar(max)");
  273. b.HasKey("Id");
  274. b.ToTable("MeetingLogs");
  275. });
  276. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  277. {
  278. b.Property<long>("Id")
  279. .ValueGeneratedOnAdd()
  280. .HasColumnType("bigint")
  281. .HasColumnOrder(0);
  282. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  283. b.Property<string>("AssignedUserId")
  284. .IsRequired()
  285. .HasColumnType("nvarchar(max)");
  286. b.Property<DateTime>("CreateDate")
  287. .HasColumnType("datetime2")
  288. .HasColumnOrder(3);
  289. b.Property<string>("CreateUser")
  290. .HasMaxLength(450)
  291. .HasColumnType("nvarchar(450)")
  292. .HasColumnOrder(1);
  293. b.Property<long>("MeetingId")
  294. .HasColumnType("bigint");
  295. b.Property<DateTime?>("UpdateDate")
  296. .HasColumnType("datetime2")
  297. .HasColumnOrder(4);
  298. b.Property<string>("UpdateUser")
  299. .HasMaxLength(450)
  300. .HasColumnType("nvarchar(450)")
  301. .HasColumnOrder(2);
  302. b.HasKey("Id");
  303. b.HasIndex("MeetingId");
  304. b.ToTable("MeetingUser");
  305. });
  306. modelBuilder.Entity("MTWorkHR.Core.Entities.Permission", b =>
  307. {
  308. b.Property<long>("Id")
  309. .ValueGeneratedOnAdd()
  310. .HasColumnType("bigint")
  311. .HasColumnOrder(0);
  312. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  313. b.Property<string>("CategoryName")
  314. .IsRequired()
  315. .HasMaxLength(150)
  316. .HasColumnType("nvarchar(150)");
  317. b.Property<string>("Desc")
  318. .IsRequired()
  319. .HasMaxLength(250)
  320. .HasColumnType("nvarchar(250)");
  321. b.Property<string>("Name")
  322. .IsRequired()
  323. .HasMaxLength(250)
  324. .HasColumnType("nvarchar(250)");
  325. b.Property<bool>("Show")
  326. .HasColumnType("bit");
  327. b.HasKey("Id");
  328. b.ToTable("Permissions");
  329. });
  330. modelBuilder.Entity("MTWorkHR.Core.Entities.Project", b =>
  331. {
  332. b.Property<long>("Id")
  333. .ValueGeneratedOnAdd()
  334. .HasColumnType("bigint")
  335. .HasColumnOrder(0);
  336. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  337. b.Property<DateTime>("CreateDate")
  338. .HasColumnType("datetime2")
  339. .HasColumnOrder(3);
  340. b.Property<string>("CreateUser")
  341. .HasMaxLength(450)
  342. .HasColumnType("nvarchar(450)")
  343. .HasColumnOrder(1);
  344. b.Property<string>("DeleteUserId")
  345. .HasMaxLength(450)
  346. .HasColumnType("nvarchar(450)")
  347. .HasColumnOrder(8);
  348. b.Property<bool>("IsDeleted")
  349. .HasColumnType("bit")
  350. .HasColumnOrder(7);
  351. b.Property<string>("NameAr")
  352. .IsRequired()
  353. .HasMaxLength(250)
  354. .HasColumnType("nvarchar(250)");
  355. b.Property<string>("NameEn")
  356. .IsRequired()
  357. .HasMaxLength(250)
  358. .HasColumnType("nvarchar(250)");
  359. b.Property<DateTime?>("UpdateDate")
  360. .HasColumnType("datetime2")
  361. .HasColumnOrder(4);
  362. b.Property<string>("UpdateUser")
  363. .HasMaxLength(450)
  364. .HasColumnType("nvarchar(450)")
  365. .HasColumnOrder(2);
  366. b.HasKey("Id");
  367. b.ToTable("Projects");
  368. });
  369. modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
  370. {
  371. b.Property<long>("Id")
  372. .ValueGeneratedOnAdd()
  373. .HasColumnType("bigint")
  374. .HasColumnOrder(0);
  375. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  376. b.Property<string>("Channel")
  377. .HasColumnType("nvarchar(max)");
  378. b.Property<DateTime>("CreateDate")
  379. .HasColumnType("datetime2");
  380. b.Property<string>("CreateUser")
  381. .IsRequired()
  382. .HasColumnType("nvarchar(max)");
  383. b.Property<string>("ErrorCode")
  384. .IsRequired()
  385. .HasColumnType("nvarchar(max)");
  386. b.Property<string>("ErrorDescription")
  387. .IsRequired()
  388. .HasColumnType("nvarchar(max)");
  389. b.Property<string>("InnerException")
  390. .HasColumnType("nvarchar(max)");
  391. b.Property<string>("Input")
  392. .HasColumnType("nvarchar(max)");
  393. b.Property<string>("Method")
  394. .IsRequired()
  395. .HasColumnType("nvarchar(max)");
  396. b.Property<string>("QueryString")
  397. .HasColumnType("nvarchar(max)");
  398. b.Property<string>("ServerIP")
  399. .HasColumnType("nvarchar(max)");
  400. b.Property<string>("ServiceResponseTimeInSeconds")
  401. .IsRequired()
  402. .HasColumnType("nvarchar(max)");
  403. b.Property<string>("UserIP")
  404. .HasColumnType("nvarchar(max)");
  405. b.Property<string>("userAgent")
  406. .HasColumnType("nvarchar(max)");
  407. b.HasKey("Id");
  408. b.ToTable("RoleLogs");
  409. });
  410. modelBuilder.Entity("MTWorkHR.Core.Entities.SettingLog", b =>
  411. {
  412. b.Property<long>("Id")
  413. .ValueGeneratedOnAdd()
  414. .HasColumnType("bigint")
  415. .HasColumnOrder(0);
  416. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  417. b.Property<string>("Channel")
  418. .HasColumnType("nvarchar(max)");
  419. b.Property<DateTime>("CreateDate")
  420. .HasColumnType("datetime2");
  421. b.Property<string>("CreateUser")
  422. .IsRequired()
  423. .HasColumnType("nvarchar(max)");
  424. b.Property<string>("ErrorCode")
  425. .IsRequired()
  426. .HasColumnType("nvarchar(max)");
  427. b.Property<string>("ErrorDescription")
  428. .IsRequired()
  429. .HasColumnType("nvarchar(max)");
  430. b.Property<string>("InnerException")
  431. .HasColumnType("nvarchar(max)");
  432. b.Property<string>("Input")
  433. .HasColumnType("nvarchar(max)");
  434. b.Property<string>("Method")
  435. .IsRequired()
  436. .HasColumnType("nvarchar(max)");
  437. b.Property<string>("QueryString")
  438. .HasColumnType("nvarchar(max)");
  439. b.Property<string>("ServerIP")
  440. .HasColumnType("nvarchar(max)");
  441. b.Property<string>("ServiceResponseTimeInSeconds")
  442. .IsRequired()
  443. .HasColumnType("nvarchar(max)");
  444. b.Property<string>("UserIP")
  445. .HasColumnType("nvarchar(max)");
  446. b.Property<string>("userAgent")
  447. .HasColumnType("nvarchar(max)");
  448. b.HasKey("Id");
  449. b.ToTable("SettingLogs");
  450. });
  451. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  452. {
  453. b.Property<long>("Id")
  454. .ValueGeneratedOnAdd()
  455. .HasColumnType("bigint")
  456. .HasColumnOrder(0);
  457. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  458. b.Property<DateTime>("CreateDate")
  459. .HasColumnType("datetime2")
  460. .HasColumnOrder(3);
  461. b.Property<string>("CreateUser")
  462. .HasMaxLength(450)
  463. .HasColumnType("nvarchar(450)")
  464. .HasColumnOrder(1);
  465. b.Property<string>("DeleteUserId")
  466. .HasMaxLength(450)
  467. .HasColumnType("nvarchar(450)")
  468. .HasColumnOrder(8);
  469. b.Property<bool>("IsDeleted")
  470. .HasColumnType("bit")
  471. .HasColumnOrder(7);
  472. b.Property<string>("NameAr")
  473. .IsRequired()
  474. .HasMaxLength(250)
  475. .HasColumnType("nvarchar(250)");
  476. b.Property<string>("NameEn")
  477. .IsRequired()
  478. .HasMaxLength(250)
  479. .HasColumnType("nvarchar(250)");
  480. b.Property<DateTime?>("UpdateDate")
  481. .HasColumnType("datetime2")
  482. .HasColumnOrder(4);
  483. b.Property<string>("UpdateUser")
  484. .HasMaxLength(450)
  485. .HasColumnType("nvarchar(450)")
  486. .HasColumnOrder(2);
  487. b.HasKey("Id");
  488. b.ToTable("Teams");
  489. });
  490. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamLog", b =>
  491. {
  492. b.Property<long>("Id")
  493. .ValueGeneratedOnAdd()
  494. .HasColumnType("bigint")
  495. .HasColumnOrder(0);
  496. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  497. b.Property<string>("Channel")
  498. .HasColumnType("nvarchar(max)");
  499. b.Property<DateTime>("CreateDate")
  500. .HasColumnType("datetime2");
  501. b.Property<string>("CreateUser")
  502. .IsRequired()
  503. .HasColumnType("nvarchar(max)");
  504. b.Property<string>("ErrorCode")
  505. .IsRequired()
  506. .HasColumnType("nvarchar(max)");
  507. b.Property<string>("ErrorDescription")
  508. .IsRequired()
  509. .HasColumnType("nvarchar(max)");
  510. b.Property<string>("InnerException")
  511. .HasColumnType("nvarchar(max)");
  512. b.Property<string>("Input")
  513. .HasColumnType("nvarchar(max)");
  514. b.Property<string>("Method")
  515. .IsRequired()
  516. .HasColumnType("nvarchar(max)");
  517. b.Property<string>("QueryString")
  518. .HasColumnType("nvarchar(max)");
  519. b.Property<string>("ServerIP")
  520. .HasColumnType("nvarchar(max)");
  521. b.Property<string>("ServiceResponseTimeInSeconds")
  522. .IsRequired()
  523. .HasColumnType("nvarchar(max)");
  524. b.Property<string>("UserIP")
  525. .HasColumnType("nvarchar(max)");
  526. b.Property<string>("userAgent")
  527. .HasColumnType("nvarchar(max)");
  528. b.HasKey("Id");
  529. b.ToTable("TeamLogs");
  530. });
  531. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  532. {
  533. b.Property<long>("Id")
  534. .ValueGeneratedOnAdd()
  535. .HasColumnType("bigint")
  536. .HasColumnOrder(0);
  537. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  538. b.Property<string>("AssignedUserId")
  539. .IsRequired()
  540. .HasColumnType("nvarchar(max)");
  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<bool>("IsAdmin")
  549. .HasColumnType("bit");
  550. b.Property<long>("TeamId")
  551. .HasColumnType("bigint");
  552. b.Property<DateTime?>("UpdateDate")
  553. .HasColumnType("datetime2")
  554. .HasColumnOrder(4);
  555. b.Property<string>("UpdateUser")
  556. .HasMaxLength(450)
  557. .HasColumnType("nvarchar(450)")
  558. .HasColumnOrder(2);
  559. b.HasKey("Id");
  560. b.HasIndex("TeamId");
  561. b.ToTable("TeamUser");
  562. });
  563. modelBuilder.Entity("MTWorkHR.Core.Entities.UserLog", b =>
  564. {
  565. b.Property<long>("Id")
  566. .ValueGeneratedOnAdd()
  567. .HasColumnType("bigint")
  568. .HasColumnOrder(0);
  569. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  570. b.Property<string>("Channel")
  571. .HasColumnType("nvarchar(max)");
  572. b.Property<DateTime>("CreateDate")
  573. .HasColumnType("datetime2");
  574. b.Property<string>("CreateUser")
  575. .IsRequired()
  576. .HasColumnType("nvarchar(max)");
  577. b.Property<string>("ErrorCode")
  578. .IsRequired()
  579. .HasColumnType("nvarchar(max)");
  580. b.Property<string>("ErrorDescription")
  581. .IsRequired()
  582. .HasColumnType("nvarchar(max)");
  583. b.Property<string>("InnerException")
  584. .HasColumnType("nvarchar(max)");
  585. b.Property<string>("Input")
  586. .HasColumnType("nvarchar(max)");
  587. b.Property<string>("Method")
  588. .IsRequired()
  589. .HasColumnType("nvarchar(max)");
  590. b.Property<string>("QueryString")
  591. .HasColumnType("nvarchar(max)");
  592. b.Property<string>("ServerIP")
  593. .HasColumnType("nvarchar(max)");
  594. b.Property<string>("ServiceResponseTimeInSeconds")
  595. .IsRequired()
  596. .HasColumnType("nvarchar(max)");
  597. b.Property<string>("UserIP")
  598. .HasColumnType("nvarchar(max)");
  599. b.Property<string>("userAgent")
  600. .HasColumnType("nvarchar(max)");
  601. b.HasKey("Id");
  602. b.ToTable("UserLogs");
  603. });
  604. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  605. {
  606. b.Property<long>("Id")
  607. .ValueGeneratedOnAdd()
  608. .HasColumnType("bigint")
  609. .HasColumnOrder(0);
  610. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  611. b.Property<long>("AssignedUserId")
  612. .HasColumnType("bigint");
  613. b.Property<DateTime>("CreateDate")
  614. .HasColumnType("datetime2")
  615. .HasColumnOrder(3);
  616. b.Property<string>("CreateUser")
  617. .HasMaxLength(450)
  618. .HasColumnType("nvarchar(450)")
  619. .HasColumnOrder(1);
  620. b.Property<string>("DeleteUserId")
  621. .HasMaxLength(450)
  622. .HasColumnType("nvarchar(450)")
  623. .HasColumnOrder(8);
  624. b.Property<string>("Description")
  625. .IsRequired()
  626. .HasColumnType("nvarchar(max)");
  627. b.Property<DateTime>("DueDate")
  628. .HasColumnType("datetime2");
  629. b.Property<bool>("IsDeleted")
  630. .HasColumnType("bit")
  631. .HasColumnOrder(7);
  632. b.Property<int>("Priority")
  633. .HasColumnType("int");
  634. b.Property<long>("ProjectId")
  635. .HasColumnType("bigint");
  636. b.Property<long>("StatusId")
  637. .HasColumnType("bigint");
  638. b.Property<string>("Title")
  639. .IsRequired()
  640. .HasColumnType("nvarchar(max)");
  641. b.Property<DateTime?>("UpdateDate")
  642. .HasColumnType("datetime2")
  643. .HasColumnOrder(4);
  644. b.Property<string>("UpdateUser")
  645. .HasMaxLength(450)
  646. .HasColumnType("nvarchar(450)")
  647. .HasColumnOrder(2);
  648. b.HasKey("Id");
  649. b.HasIndex("ProjectId");
  650. b.HasIndex("StatusId");
  651. b.ToTable("UserTasks");
  652. });
  653. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  654. {
  655. b.Property<long>("Id")
  656. .ValueGeneratedOnAdd()
  657. .HasColumnType("bigint")
  658. .HasColumnOrder(0);
  659. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  660. b.Property<long>("AttachmentTypeId")
  661. .HasColumnType("bigint");
  662. b.Property<DateTime>("CreateDate")
  663. .HasColumnType("datetime2")
  664. .HasColumnOrder(3);
  665. b.Property<string>("CreateUser")
  666. .HasMaxLength(450)
  667. .HasColumnType("nvarchar(450)")
  668. .HasColumnOrder(1);
  669. b.Property<string>("FileName")
  670. .HasMaxLength(250)
  671. .HasColumnType("nvarchar(250)");
  672. b.Property<string>("OriginalName")
  673. .IsRequired()
  674. .HasMaxLength(250)
  675. .HasColumnType("nvarchar(250)");
  676. b.Property<long>("TaskId")
  677. .HasColumnType("bigint");
  678. b.Property<DateTime?>("UpdateDate")
  679. .HasColumnType("datetime2")
  680. .HasColumnOrder(4);
  681. b.Property<string>("UpdateUser")
  682. .HasMaxLength(450)
  683. .HasColumnType("nvarchar(450)")
  684. .HasColumnOrder(2);
  685. b.HasKey("Id");
  686. b.HasIndex("AttachmentTypeId");
  687. b.HasIndex("TaskId");
  688. b.ToTable("UserTaskAttachments");
  689. });
  690. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  691. {
  692. b.Property<long>("Id")
  693. .ValueGeneratedOnAdd()
  694. .HasColumnType("bigint")
  695. .HasColumnOrder(0);
  696. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  697. b.Property<long>("AssignedToUserId")
  698. .HasColumnType("bigint");
  699. b.Property<string>("Comment")
  700. .HasMaxLength(500)
  701. .HasColumnType("nvarchar(500)");
  702. b.Property<DateTime>("CreateDate")
  703. .HasColumnType("datetime2")
  704. .HasColumnOrder(3);
  705. b.Property<string>("CreateUser")
  706. .HasMaxLength(450)
  707. .HasColumnType("nvarchar(450)")
  708. .HasColumnOrder(1);
  709. b.Property<long>("CurrentStatusId")
  710. .HasColumnType("bigint");
  711. b.Property<bool>("IsDeleted")
  712. .HasColumnType("bit");
  713. b.Property<long>("TaskId")
  714. .HasColumnType("bigint");
  715. b.Property<DateTime?>("UpdateDate")
  716. .HasColumnType("datetime2")
  717. .HasColumnOrder(4);
  718. b.Property<string>("UpdateUser")
  719. .HasMaxLength(450)
  720. .HasColumnType("nvarchar(450)")
  721. .HasColumnOrder(2);
  722. b.Property<long?>("UserTaskId")
  723. .HasColumnType("bigint");
  724. b.HasKey("Id");
  725. b.HasIndex("CurrentStatusId");
  726. b.HasIndex("UserTaskId");
  727. b.ToTable("UserTaskHistories");
  728. });
  729. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskLog", b =>
  730. {
  731. b.Property<long>("Id")
  732. .ValueGeneratedOnAdd()
  733. .HasColumnType("bigint")
  734. .HasColumnOrder(0);
  735. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  736. b.Property<string>("Channel")
  737. .HasColumnType("nvarchar(max)");
  738. b.Property<DateTime>("CreateDate")
  739. .HasColumnType("datetime2");
  740. b.Property<string>("CreateUser")
  741. .IsRequired()
  742. .HasColumnType("nvarchar(max)");
  743. b.Property<string>("ErrorCode")
  744. .IsRequired()
  745. .HasColumnType("nvarchar(max)");
  746. b.Property<string>("ErrorDescription")
  747. .IsRequired()
  748. .HasColumnType("nvarchar(max)");
  749. b.Property<string>("InnerException")
  750. .HasColumnType("nvarchar(max)");
  751. b.Property<string>("Input")
  752. .HasColumnType("nvarchar(max)");
  753. b.Property<string>("Method")
  754. .IsRequired()
  755. .HasColumnType("nvarchar(max)");
  756. b.Property<string>("QueryString")
  757. .HasColumnType("nvarchar(max)");
  758. b.Property<string>("ServerIP")
  759. .HasColumnType("nvarchar(max)");
  760. b.Property<string>("ServiceResponseTimeInSeconds")
  761. .IsRequired()
  762. .HasColumnType("nvarchar(max)");
  763. b.Property<string>("UserIP")
  764. .HasColumnType("nvarchar(max)");
  765. b.Property<string>("userAgent")
  766. .HasColumnType("nvarchar(max)");
  767. b.HasKey("Id");
  768. b.ToTable("UserTaskLogs");
  769. });
  770. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskStatus", b =>
  771. {
  772. b.Property<long>("Id")
  773. .ValueGeneratedOnAdd()
  774. .HasColumnType("bigint")
  775. .HasColumnOrder(0);
  776. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  777. b.Property<string>("NameAr")
  778. .IsRequired()
  779. .HasMaxLength(250)
  780. .HasColumnType("nvarchar(250)");
  781. b.Property<string>("NameEn")
  782. .IsRequired()
  783. .HasMaxLength(250)
  784. .HasColumnType("nvarchar(250)");
  785. b.HasKey("Id");
  786. b.ToTable("UserTaskStatuses");
  787. b.HasData(
  788. new
  789. {
  790. Id = 1L,
  791. NameAr = "جديدة",
  792. NameEn = "New"
  793. },
  794. new
  795. {
  796. Id = 2L,
  797. NameAr = "قيد العمل",
  798. NameEn = "Under progress"
  799. },
  800. new
  801. {
  802. Id = 3L,
  803. NameAr = "أغلقت",
  804. NameEn = "Closed"
  805. },
  806. new
  807. {
  808. Id = 4L,
  809. NameAr = "تمت",
  810. NameEn = "Completed"
  811. },
  812. new
  813. {
  814. Id = 5L,
  815. NameAr = "مؤجلة",
  816. NameEn = "Delayed"
  817. });
  818. });
  819. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  820. {
  821. b.Property<string>("Id")
  822. .HasColumnType("nvarchar(450)");
  823. b.Property<string>("ConcurrencyStamp")
  824. .IsConcurrencyToken()
  825. .HasColumnType("nvarchar(max)");
  826. b.Property<DateTime>("CreateDate")
  827. .HasColumnType("datetime2");
  828. b.Property<string>("CreateUser")
  829. .HasColumnType("nvarchar(max)");
  830. b.Property<string>("DeleteUserId")
  831. .HasColumnType("nvarchar(max)");
  832. b.Property<bool?>("IsAdmin")
  833. .HasColumnType("bit");
  834. b.Property<bool>("IsDeleted")
  835. .HasColumnType("bit");
  836. b.Property<string>("Name")
  837. .HasMaxLength(256)
  838. .HasColumnType("nvarchar(256)");
  839. b.Property<string>("NormalizedName")
  840. .HasMaxLength(256)
  841. .HasColumnType("nvarchar(256)");
  842. b.Property<DateTime?>("UpdateDate")
  843. .HasColumnType("datetime2");
  844. b.Property<string>("UpdateUser")
  845. .HasColumnType("nvarchar(max)");
  846. b.HasKey("Id");
  847. b.HasIndex("NormalizedName")
  848. .IsUnique()
  849. .HasDatabaseName("RoleNameIndex")
  850. .HasFilter("[NormalizedName] IS NOT NULL");
  851. b.ToTable("AspNetRoles", (string)null);
  852. b.HasData(
  853. new
  854. {
  855. Id = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A",
  856. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  857. IsAdmin = true,
  858. IsDeleted = false,
  859. Name = "Admin",
  860. NormalizedName = "ADMIN"
  861. },
  862. new
  863. {
  864. Id = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E",
  865. CreateDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
  866. IsAdmin = false,
  867. IsDeleted = false,
  868. Name = "Employee",
  869. NormalizedName = "EMPLOYEE"
  870. });
  871. });
  872. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  873. {
  874. b.Property<string>("Id")
  875. .HasColumnType("nvarchar(450)");
  876. b.Property<int>("AccessFailedCount")
  877. .HasColumnType("int");
  878. b.Property<string>("ConcurrencyStamp")
  879. .IsConcurrencyToken()
  880. .HasColumnType("nvarchar(max)");
  881. b.Property<string>("CreateUser")
  882. .HasColumnType("nvarchar(max)");
  883. b.Property<string>("DeleteUserId")
  884. .HasColumnType("nvarchar(max)");
  885. b.Property<string>("Email")
  886. .HasMaxLength(256)
  887. .HasColumnType("nvarchar(256)");
  888. b.Property<bool>("EmailConfirmed")
  889. .HasColumnType("bit");
  890. b.Property<string>("FavoriteName")
  891. .HasColumnType("nvarchar(max)");
  892. b.Property<string>("FirstName")
  893. .IsRequired()
  894. .HasColumnType("nvarchar(max)");
  895. b.Property<decimal?>("IncomeTaxValue")
  896. .HasColumnType("decimal(18,2)");
  897. b.Property<bool>("IsDeleted")
  898. .HasColumnType("bit");
  899. b.Property<bool>("IsStopped")
  900. .HasColumnType("bit");
  901. b.Property<string>("JobTitle")
  902. .HasColumnType("nvarchar(max)");
  903. b.Property<string>("LastName")
  904. .IsRequired()
  905. .HasColumnType("nvarchar(max)");
  906. b.Property<bool>("LockoutEnabled")
  907. .HasColumnType("bit");
  908. b.Property<DateTimeOffset?>("LockoutEnd")
  909. .HasColumnType("datetimeoffset");
  910. b.Property<string>("ManagerId")
  911. .HasColumnType("nvarchar(450)");
  912. b.Property<string>("NormalizedEmail")
  913. .HasMaxLength(256)
  914. .HasColumnType("nvarchar(256)");
  915. b.Property<string>("NormalizedUserName")
  916. .HasMaxLength(256)
  917. .HasColumnType("nvarchar(256)");
  918. b.Property<string>("PassportNumber")
  919. .IsRequired()
  920. .HasColumnType("nvarchar(max)");
  921. b.Property<string>("PasswordHash")
  922. .HasColumnType("nvarchar(max)");
  923. b.Property<string>("PhoneNumber")
  924. .HasColumnType("nvarchar(max)");
  925. b.Property<bool>("PhoneNumberConfirmed")
  926. .HasColumnType("bit");
  927. b.Property<int?>("QualificationId")
  928. .HasColumnType("int");
  929. b.Property<string>("SecurityStamp")
  930. .HasColumnType("nvarchar(max)");
  931. b.Property<decimal?>("TaxNumber")
  932. .HasColumnType("decimal(18,2)");
  933. b.Property<bool>("TwoFactorEnabled")
  934. .HasColumnType("bit");
  935. b.Property<string>("University")
  936. .HasColumnType("nvarchar(max)");
  937. b.Property<string>("UpdateUser")
  938. .HasColumnType("nvarchar(max)");
  939. b.Property<string>("UserName")
  940. .HasMaxLength(256)
  941. .HasColumnType("nvarchar(256)");
  942. b.Property<int>("UserType")
  943. .HasColumnType("int");
  944. b.HasKey("Id");
  945. b.HasIndex("ManagerId");
  946. b.HasIndex("NormalizedEmail")
  947. .HasDatabaseName("EmailIndex");
  948. b.HasIndex("NormalizedUserName")
  949. .IsUnique()
  950. .HasDatabaseName("UserNameIndex")
  951. .HasFilter("[NormalizedUserName] IS NOT NULL");
  952. b.ToTable("AspNetUsers", (string)null);
  953. b.HasData(
  954. new
  955. {
  956. Id = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  957. AccessFailedCount = 0,
  958. ConcurrencyStamp = "7cc87689-9eab-4280-b8e3-1834080783a5",
  959. Email = "a@b.com",
  960. EmailConfirmed = true,
  961. FirstName = "Zinab",
  962. IncomeTaxValue = 1m,
  963. IsDeleted = false,
  964. IsStopped = false,
  965. LastName = "Elgendy",
  966. LockoutEnabled = false,
  967. NormalizedEmail = "A@B.COM",
  968. NormalizedUserName = "ADMIN",
  969. PassportNumber = "1234567",
  970. PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
  971. PhoneNumber = "1234567890",
  972. PhoneNumberConfirmed = true,
  973. QualificationId = 1,
  974. SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
  975. TaxNumber = 111m,
  976. TwoFactorEnabled = false,
  977. UserName = "Admin",
  978. UserType = 1
  979. },
  980. new
  981. {
  982. Id = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  983. AccessFailedCount = 0,
  984. ConcurrencyStamp = "4af7b4cf-802a-455b-b598-997e167745b3",
  985. Email = "ali@b.com",
  986. EmailConfirmed = true,
  987. FirstName = "Ali",
  988. IncomeTaxValue = 100m,
  989. IsDeleted = false,
  990. IsStopped = false,
  991. LastName = "Farok",
  992. LockoutEnabled = false,
  993. NormalizedEmail = "ALI@B.COM",
  994. NormalizedUserName = "ALI",
  995. PassportNumber = "7654321001010",
  996. PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
  997. PhoneNumber = "1234567890",
  998. PhoneNumberConfirmed = true,
  999. QualificationId = 1,
  1000. SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
  1001. TaxNumber = 222m,
  1002. TwoFactorEnabled = false,
  1003. UserName = "ali",
  1004. UserType = 1
  1005. });
  1006. });
  1007. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  1008. {
  1009. b.Property<long>("Id")
  1010. .ValueGeneratedOnAdd()
  1011. .HasColumnType("bigint")
  1012. .HasColumnOrder(0);
  1013. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1014. b.Property<long>("PermissionId")
  1015. .HasColumnType("bigint");
  1016. b.Property<string>("PermissionName")
  1017. .IsRequired()
  1018. .HasColumnType("nvarchar(max)");
  1019. b.Property<string>("RoleId")
  1020. .IsRequired()
  1021. .HasColumnType("nvarchar(450)");
  1022. b.HasKey("Id");
  1023. b.HasIndex("PermissionId");
  1024. b.HasIndex("RoleId");
  1025. b.ToTable("RolePermissions");
  1026. });
  1027. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  1028. {
  1029. b.Property<long>("Id")
  1030. .ValueGeneratedOnAdd()
  1031. .HasColumnType("bigint")
  1032. .HasColumnOrder(0);
  1033. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1034. b.Property<string>("AddressDesc")
  1035. .IsRequired()
  1036. .HasColumnType("nvarchar(max)");
  1037. b.Property<string>("City")
  1038. .IsRequired()
  1039. .HasColumnType("nvarchar(max)");
  1040. b.Property<int>("CountryId")
  1041. .HasColumnType("int");
  1042. b.Property<DateTime>("CreateDate")
  1043. .HasColumnType("datetime2")
  1044. .HasColumnOrder(3);
  1045. b.Property<string>("CreateUser")
  1046. .HasMaxLength(450)
  1047. .HasColumnType("nvarchar(450)")
  1048. .HasColumnOrder(1);
  1049. b.Property<string>("PostalCode")
  1050. .IsRequired()
  1051. .HasColumnType("nvarchar(max)");
  1052. b.Property<DateTime?>("UpdateDate")
  1053. .HasColumnType("datetime2")
  1054. .HasColumnOrder(4);
  1055. b.Property<string>("UpdateUser")
  1056. .HasMaxLength(450)
  1057. .HasColumnType("nvarchar(450)")
  1058. .HasColumnOrder(2);
  1059. b.Property<string>("UserId")
  1060. .IsRequired()
  1061. .HasColumnType("nvarchar(450)");
  1062. b.HasKey("Id");
  1063. b.HasIndex("UserId")
  1064. .IsUnique();
  1065. b.ToTable("UserAddress");
  1066. });
  1067. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  1068. {
  1069. b.Property<long>("Id")
  1070. .ValueGeneratedOnAdd()
  1071. .HasColumnType("bigint")
  1072. .HasColumnOrder(0);
  1073. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
  1074. b.Property<long>("AttachmentTypeId")
  1075. .HasColumnType("bigint");
  1076. b.Property<DateTime>("CreateDate")
  1077. .HasColumnType("datetime2")
  1078. .HasColumnOrder(3);
  1079. b.Property<string>("CreateUser")
  1080. .HasMaxLength(450)
  1081. .HasColumnType("nvarchar(450)")
  1082. .HasColumnOrder(1);
  1083. b.Property<string>("FileName")
  1084. .IsRequired()
  1085. .HasMaxLength(250)
  1086. .HasColumnType("nvarchar(250)");
  1087. b.Property<string>("OriginalName")
  1088. .IsRequired()
  1089. .HasMaxLength(250)
  1090. .HasColumnType("nvarchar(250)");
  1091. b.Property<DateTime?>("UpdateDate")
  1092. .HasColumnType("datetime2")
  1093. .HasColumnOrder(4);
  1094. b.Property<string>("UpdateUser")
  1095. .HasMaxLength(450)
  1096. .HasColumnType("nvarchar(450)")
  1097. .HasColumnOrder(2);
  1098. b.Property<string>("UserId")
  1099. .IsRequired()
  1100. .HasColumnType("nvarchar(450)");
  1101. b.HasKey("Id");
  1102. b.HasIndex("AttachmentTypeId");
  1103. b.HasIndex("UserId");
  1104. b.ToTable("UserAttachments");
  1105. });
  1106. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  1107. {
  1108. b.Property<int>("Id")
  1109. .ValueGeneratedOnAdd()
  1110. .HasColumnType("int");
  1111. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  1112. b.Property<string>("ClaimType")
  1113. .HasColumnType("nvarchar(max)");
  1114. b.Property<string>("ClaimValue")
  1115. .HasColumnType("nvarchar(max)");
  1116. b.Property<string>("RoleId")
  1117. .IsRequired()
  1118. .HasColumnType("nvarchar(450)");
  1119. b.HasKey("Id");
  1120. b.HasIndex("RoleId");
  1121. b.ToTable("AspNetRoleClaims", (string)null);
  1122. });
  1123. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  1124. {
  1125. b.Property<int>("Id")
  1126. .ValueGeneratedOnAdd()
  1127. .HasColumnType("int");
  1128. SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
  1129. b.Property<string>("ClaimType")
  1130. .HasColumnType("nvarchar(max)");
  1131. b.Property<string>("ClaimValue")
  1132. .HasColumnType("nvarchar(max)");
  1133. b.Property<string>("UserId")
  1134. .IsRequired()
  1135. .HasColumnType("nvarchar(450)");
  1136. b.HasKey("Id");
  1137. b.HasIndex("UserId");
  1138. b.ToTable("AspNetUserClaims", (string)null);
  1139. });
  1140. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  1141. {
  1142. b.Property<string>("LoginProvider")
  1143. .HasColumnType("nvarchar(450)");
  1144. b.Property<string>("ProviderKey")
  1145. .HasColumnType("nvarchar(450)");
  1146. b.Property<string>("ProviderDisplayName")
  1147. .HasColumnType("nvarchar(max)");
  1148. b.Property<string>("UserId")
  1149. .IsRequired()
  1150. .HasColumnType("nvarchar(450)");
  1151. b.HasKey("LoginProvider", "ProviderKey");
  1152. b.HasIndex("UserId");
  1153. b.ToTable("AspNetUserLogins", (string)null);
  1154. });
  1155. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  1156. {
  1157. b.Property<string>("UserId")
  1158. .HasColumnType("nvarchar(450)");
  1159. b.Property<string>("RoleId")
  1160. .HasColumnType("nvarchar(450)");
  1161. b.HasKey("UserId", "RoleId");
  1162. b.HasIndex("RoleId");
  1163. b.ToTable("AspNetUserRoles", (string)null);
  1164. b.HasData(
  1165. new
  1166. {
  1167. UserId = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  1168. RoleId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A"
  1169. },
  1170. new
  1171. {
  1172. UserId = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  1173. RoleId = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E"
  1174. });
  1175. });
  1176. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  1177. {
  1178. b.Property<string>("UserId")
  1179. .HasColumnType("nvarchar(450)");
  1180. b.Property<string>("LoginProvider")
  1181. .HasColumnType("nvarchar(450)");
  1182. b.Property<string>("Name")
  1183. .HasColumnType("nvarchar(450)");
  1184. b.Property<string>("Value")
  1185. .HasColumnType("nvarchar(max)");
  1186. b.HasKey("UserId", "LoginProvider", "Name");
  1187. b.ToTable("AspNetUserTokens", (string)null);
  1188. });
  1189. modelBuilder.Entity("ApplicationRoleApplicationUser", b =>
  1190. {
  1191. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1192. .WithMany()
  1193. .HasForeignKey("UserRolesId")
  1194. .OnDelete(DeleteBehavior.Cascade)
  1195. .IsRequired();
  1196. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1197. .WithMany()
  1198. .HasForeignKey("UsersId")
  1199. .OnDelete(DeleteBehavior.Cascade)
  1200. .IsRequired();
  1201. });
  1202. modelBuilder.Entity("MTWorkHR.Core.Entities.MeetingUser", b =>
  1203. {
  1204. b.HasOne("MTWorkHR.Core.Entities.Meeting", "Meeting")
  1205. .WithMany("MeetingUsers")
  1206. .HasForeignKey("MeetingId")
  1207. .OnDelete(DeleteBehavior.Cascade)
  1208. .IsRequired();
  1209. b.Navigation("Meeting");
  1210. });
  1211. modelBuilder.Entity("MTWorkHR.Core.Entities.TeamUser", b =>
  1212. {
  1213. b.HasOne("MTWorkHR.Core.Entities.Team", "Team")
  1214. .WithMany("TeamUsers")
  1215. .HasForeignKey("TeamId")
  1216. .OnDelete(DeleteBehavior.Cascade)
  1217. .IsRequired();
  1218. b.Navigation("Team");
  1219. });
  1220. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  1221. {
  1222. b.HasOne("MTWorkHR.Core.Entities.Project", "Project")
  1223. .WithMany()
  1224. .HasForeignKey("ProjectId")
  1225. .OnDelete(DeleteBehavior.Cascade)
  1226. .IsRequired();
  1227. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  1228. .WithMany()
  1229. .HasForeignKey("StatusId")
  1230. .OnDelete(DeleteBehavior.Cascade)
  1231. .IsRequired();
  1232. b.Navigation("Project");
  1233. b.Navigation("TaskStatus");
  1234. });
  1235. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskAttachment", b =>
  1236. {
  1237. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  1238. .WithMany()
  1239. .HasForeignKey("AttachmentTypeId")
  1240. .OnDelete(DeleteBehavior.Cascade)
  1241. .IsRequired();
  1242. b.HasOne("MTWorkHR.Core.Entities.UserTask", "UserTask")
  1243. .WithMany("TaskAttachments")
  1244. .HasForeignKey("TaskId")
  1245. .OnDelete(DeleteBehavior.Cascade)
  1246. .IsRequired();
  1247. b.Navigation("AttachmentType");
  1248. b.Navigation("UserTask");
  1249. });
  1250. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTaskHistory", b =>
  1251. {
  1252. b.HasOne("MTWorkHR.Core.Entities.UserTaskStatus", "TaskStatus")
  1253. .WithMany()
  1254. .HasForeignKey("CurrentStatusId")
  1255. .OnDelete(DeleteBehavior.Cascade)
  1256. .IsRequired();
  1257. b.HasOne("MTWorkHR.Core.Entities.UserTask", null)
  1258. .WithMany("UserTaskHistories")
  1259. .HasForeignKey("UserTaskId");
  1260. b.Navigation("TaskStatus");
  1261. });
  1262. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  1263. {
  1264. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "Manager")
  1265. .WithMany()
  1266. .HasForeignKey("ManagerId");
  1267. b.Navigation("Manager");
  1268. });
  1269. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>
  1270. {
  1271. b.HasOne("MTWorkHR.Core.Entities.Permission", "Permission")
  1272. .WithMany()
  1273. .HasForeignKey("PermissionId")
  1274. .OnDelete(DeleteBehavior.Cascade)
  1275. .IsRequired();
  1276. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", "Role")
  1277. .WithMany("RolePermissions")
  1278. .HasForeignKey("RoleId")
  1279. .OnDelete(DeleteBehavior.Cascade)
  1280. .IsRequired();
  1281. b.Navigation("Permission");
  1282. b.Navigation("Role");
  1283. });
  1284. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAddress", b =>
  1285. {
  1286. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  1287. .WithOne("UserAddress")
  1288. .HasForeignKey("MTWorkHR.Infrastructure.Entities.UserAddress", "UserId")
  1289. .OnDelete(DeleteBehavior.Cascade)
  1290. .IsRequired();
  1291. b.Navigation("User");
  1292. });
  1293. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.UserAttachment", b =>
  1294. {
  1295. b.HasOne("MTWorkHR.Core.Entities.Base.AttachmentType", "AttachmentType")
  1296. .WithMany()
  1297. .HasForeignKey("AttachmentTypeId")
  1298. .OnDelete(DeleteBehavior.Cascade)
  1299. .IsRequired();
  1300. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "User")
  1301. .WithMany("UserAttachments")
  1302. .HasForeignKey("UserId")
  1303. .OnDelete(DeleteBehavior.Cascade)
  1304. .IsRequired();
  1305. b.Navigation("AttachmentType");
  1306. b.Navigation("User");
  1307. });
  1308. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
  1309. {
  1310. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1311. .WithMany()
  1312. .HasForeignKey("RoleId")
  1313. .OnDelete(DeleteBehavior.Cascade)
  1314. .IsRequired();
  1315. });
  1316. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
  1317. {
  1318. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1319. .WithMany()
  1320. .HasForeignKey("UserId")
  1321. .OnDelete(DeleteBehavior.Cascade)
  1322. .IsRequired();
  1323. });
  1324. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
  1325. {
  1326. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1327. .WithMany()
  1328. .HasForeignKey("UserId")
  1329. .OnDelete(DeleteBehavior.Cascade)
  1330. .IsRequired();
  1331. });
  1332. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
  1333. {
  1334. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationRole", null)
  1335. .WithMany()
  1336. .HasForeignKey("RoleId")
  1337. .OnDelete(DeleteBehavior.Cascade)
  1338. .IsRequired();
  1339. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1340. .WithMany()
  1341. .HasForeignKey("UserId")
  1342. .OnDelete(DeleteBehavior.Cascade)
  1343. .IsRequired();
  1344. });
  1345. modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
  1346. {
  1347. b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", null)
  1348. .WithMany()
  1349. .HasForeignKey("UserId")
  1350. .OnDelete(DeleteBehavior.Cascade)
  1351. .IsRequired();
  1352. });
  1353. modelBuilder.Entity("MTWorkHR.Core.Entities.Meeting", b =>
  1354. {
  1355. b.Navigation("MeetingUsers");
  1356. });
  1357. modelBuilder.Entity("MTWorkHR.Core.Entities.Team", b =>
  1358. {
  1359. b.Navigation("TeamUsers");
  1360. });
  1361. modelBuilder.Entity("MTWorkHR.Core.Entities.UserTask", b =>
  1362. {
  1363. b.Navigation("TaskAttachments");
  1364. b.Navigation("UserTaskHistories");
  1365. });
  1366. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationRole", b =>
  1367. {
  1368. b.Navigation("RolePermissions");
  1369. });
  1370. modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
  1371. {
  1372. b.Navigation("UserAddress")
  1373. .IsRequired();
  1374. b.Navigation("UserAttachments");
  1375. });
  1376. #pragma warning restore 612, 618
  1377. }
  1378. }
  1379. }