20211026062747_20211026.Designer.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Metadata;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. using wispro.sp.api;
  9. namespace wispro.sp.api.Migrations
  10. {
  11. [DbContext(typeof(spDbContext))]
  12. [Migration("20211026062747_20211026")]
  13. partial class _20211026
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasAnnotation("Relational:MaxIdentifierLength", 128)
  20. .HasAnnotation("ProductVersion", "5.0.9")
  21. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  22. modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
  23. {
  24. b.Property<Guid>("Id")
  25. .ValueGeneratedOnAdd()
  26. .HasColumnType("uniqueidentifier");
  27. b.Property<string>("Name")
  28. .HasMaxLength(200)
  29. .HasColumnType("nvarchar(200)");
  30. b.Property<string>("SavePath")
  31. .HasMaxLength(200)
  32. .HasColumnType("nvarchar(200)");
  33. b.Property<int>("UploadUserId")
  34. .HasColumnType("int");
  35. b.HasKey("Id");
  36. b.HasIndex("UploadUserId");
  37. b.ToTable("AttachFile");
  38. });
  39. modelBuilder.Entity("wispro.sp.entity.BasePointRule", b =>
  40. {
  41. b.Property<int>("Id")
  42. .ValueGeneratedOnAdd()
  43. .HasColumnType("int")
  44. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  45. b.Property<double>("Point")
  46. .HasColumnType("float");
  47. b.Property<int>("Priority")
  48. .HasColumnType("int");
  49. b.Property<string>("Rule")
  50. .HasColumnType("nvarchar(max)");
  51. b.Property<string>("Type")
  52. .HasColumnType("nvarchar(max)");
  53. b.HasKey("Id");
  54. b.ToTable("BasePointRules");
  55. });
  56. modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
  57. {
  58. b.Property<int>("Id")
  59. .ValueGeneratedOnAdd()
  60. .HasColumnType("int")
  61. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  62. b.Property<int>("Month")
  63. .HasColumnType("int")
  64. .HasColumnName("month");
  65. b.Property<int>("Status")
  66. .HasColumnType("int")
  67. .HasColumnName("status");
  68. b.Property<int>("Year")
  69. .HasColumnType("int")
  70. .HasColumnName("year");
  71. b.HasKey("Id");
  72. b.ToTable("CalMonth");
  73. });
  74. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  75. {
  76. b.Property<int>("Id")
  77. .ValueGeneratedOnAdd()
  78. .HasColumnType("int")
  79. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  80. b.Property<string>("Address")
  81. .HasMaxLength(500)
  82. .HasColumnType("nvarchar(500)");
  83. b.Property<string>("ContactMan")
  84. .HasMaxLength(50)
  85. .HasColumnType("nvarchar(50)");
  86. b.Property<string>("Name")
  87. .IsRequired()
  88. .HasMaxLength(200)
  89. .HasColumnType("nvarchar(200)");
  90. b.Property<string>("Phone")
  91. .HasMaxLength(50)
  92. .HasColumnType("nvarchar(50)");
  93. b.Property<int?>("ResponseManId")
  94. .HasColumnType("int");
  95. b.HasKey("Id");
  96. b.HasIndex("ResponseManId");
  97. b.ToTable("Customer");
  98. });
  99. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  100. {
  101. b.Property<int>("ItemId")
  102. .HasColumnType("int");
  103. b.Property<int>("DoPersonId")
  104. .HasColumnType("int");
  105. b.Property<double>("PerformancePoint")
  106. .HasColumnType("float");
  107. b.HasKey("ItemId", "DoPersonId");
  108. b.HasIndex("DoPersonId");
  109. b.ToTable("ItemStaff");
  110. });
  111. modelBuilder.Entity("wispro.sp.entity.Message", b =>
  112. {
  113. b.Property<Guid>("Id")
  114. .ValueGeneratedOnAdd()
  115. .HasColumnType("uniqueidentifier");
  116. b.Property<int>("FromId")
  117. .HasColumnType("int");
  118. b.Property<string>("MessageInfo")
  119. .HasMaxLength(500)
  120. .HasColumnType("nvarchar(500)");
  121. b.Property<int>("Type")
  122. .HasColumnType("int");
  123. b.HasKey("Id");
  124. b.HasIndex("FromId");
  125. b.ToTable("Message");
  126. });
  127. modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
  128. {
  129. b.Property<int>("ItemId")
  130. .HasColumnType("int");
  131. b.Property<Guid>("MessageId")
  132. .HasColumnType("uniqueidentifier");
  133. b.HasKey("ItemId", "MessageId");
  134. b.HasIndex("MessageId");
  135. b.ToTable("MessagePerformanceItems");
  136. });
  137. modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
  138. {
  139. b.Property<Guid>("MessageId")
  140. .HasColumnType("uniqueidentifier");
  141. b.Property<int>("StaffId")
  142. .HasColumnType("int");
  143. b.Property<Guid?>("MessageId1")
  144. .HasColumnType("uniqueidentifier");
  145. b.Property<bool>("isReaded")
  146. .HasColumnType("bit");
  147. b.HasKey("MessageId", "StaffId");
  148. b.HasIndex("MessageId1");
  149. b.HasIndex("StaffId");
  150. b.ToTable("MessageReadRecord");
  151. });
  152. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  153. {
  154. b.Property<int>("Id")
  155. .ValueGeneratedOnAdd()
  156. .HasColumnType("int")
  157. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  158. b.Property<string>("AgentFeedbackMemo")
  159. .HasColumnType("nvarchar(max)");
  160. b.Property<string>("ApplicationName")
  161. .HasMaxLength(200)
  162. .HasColumnType("nvarchar(200)");
  163. b.Property<string>("ApplicationType")
  164. .HasMaxLength(50)
  165. .HasColumnType("nvarchar(50)");
  166. b.Property<decimal?>("BasePoint")
  167. .HasColumnType("numeric(18,2)");
  168. b.Property<string>("BusinessType")
  169. .HasMaxLength(50)
  170. .HasColumnType("nvarchar(50)");
  171. b.Property<int>("CalMonthId")
  172. .HasColumnType("int");
  173. b.Property<string>("CaseCoefficient")
  174. .HasMaxLength(10)
  175. .HasColumnType("nvarchar(10)");
  176. b.Property<string>("CaseMemo")
  177. .HasColumnType("nvarchar(max)");
  178. b.Property<string>("CaseName")
  179. .HasMaxLength(500)
  180. .HasColumnType("nvarchar(500)");
  181. b.Property<string>("CaseNo")
  182. .HasMaxLength(50)
  183. .HasColumnType("nvarchar(50)");
  184. b.Property<string>("CaseStage")
  185. .HasMaxLength(50)
  186. .HasColumnType("nvarchar(50)");
  187. b.Property<string>("CaseState")
  188. .HasMaxLength(50)
  189. .HasColumnType("nvarchar(50)");
  190. b.Property<string>("CaseType")
  191. .HasMaxLength(50)
  192. .HasColumnType("nvarchar(50)");
  193. b.Property<int?>("CustomerId")
  194. .HasColumnType("int");
  195. b.Property<DateTime?>("CustomerLimitDate")
  196. .HasColumnType("date");
  197. b.Property<string>("DoItem")
  198. .HasMaxLength(50)
  199. .HasColumnType("nvarchar(50)");
  200. b.Property<string>("DoItemCoefficient")
  201. .HasMaxLength(50)
  202. .HasColumnType("nvarchar(50)");
  203. b.Property<string>("DoItemMemo")
  204. .HasMaxLength(500)
  205. .HasColumnType("nvarchar(500)");
  206. b.Property<string>("DoItemState")
  207. .HasMaxLength(50)
  208. .HasColumnType("nvarchar(50)");
  209. b.Property<DateTime?>("EntrustingDate")
  210. .HasColumnType("date");
  211. b.Property<DateTime?>("FinalizationDate")
  212. .HasColumnType("date");
  213. b.Property<DateTime?>("FinishedDate")
  214. .HasColumnType("date");
  215. b.Property<DateTime?>("FirstDraftDate")
  216. .HasColumnType("date");
  217. b.Property<DateTime?>("InternalDate")
  218. .HasColumnType("date");
  219. b.Property<string>("OverDueMemo")
  220. .HasMaxLength(100)
  221. .HasColumnType("nvarchar(100)");
  222. b.Property<int?>("PreOastaffId")
  223. .HasColumnType("int")
  224. .HasColumnName("PreOAStaffId");
  225. b.Property<DateTime?>("ReturnDate")
  226. .HasColumnType("date");
  227. b.Property<int?>("ReviewerId")
  228. .HasColumnType("int");
  229. b.Property<int?>("Status")
  230. .HasColumnType("int");
  231. b.Property<string>("Type")
  232. .HasColumnType("nvarchar(max)");
  233. b.Property<int?>("WordCount")
  234. .HasColumnType("int");
  235. b.HasKey("Id");
  236. b.HasIndex("CalMonthId");
  237. b.HasIndex("CustomerId");
  238. b.HasIndex("PreOastaffId");
  239. b.HasIndex("ReviewerId");
  240. b.ToTable("PerformanceItem");
  241. });
  242. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  243. {
  244. b.Property<int>("Id")
  245. .ValueGeneratedOnAdd()
  246. .HasColumnType("int")
  247. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  248. b.Property<string>("Account")
  249. .IsRequired()
  250. .HasMaxLength(50)
  251. .HasColumnType("nvarchar(50)");
  252. b.Property<string>("Department")
  253. .HasMaxLength(50)
  254. .HasColumnType("nvarchar(50)");
  255. b.Property<DateTime?>("EntyDate")
  256. .HasColumnType("date");
  257. b.Property<bool>("IsCalPerformsnce")
  258. .HasColumnType("bit")
  259. .HasColumnName("isCalPerformsnce");
  260. b.Property<bool>("IsOnJob")
  261. .HasColumnType("bit");
  262. b.Property<string>("Mail")
  263. .HasColumnType("nvarchar(max)");
  264. b.Property<string>("Memo")
  265. .HasColumnType("nvarchar(max)");
  266. b.Property<string>("Mobile")
  267. .HasColumnType("nvarchar(max)");
  268. b.Property<string>("Name")
  269. .IsRequired()
  270. .HasMaxLength(50)
  271. .HasColumnType("nvarchar(50)");
  272. b.Property<string>("Password")
  273. .IsRequired()
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<string>("Sex")
  276. .HasColumnType("nvarchar(max)");
  277. b.Property<int>("StaffGradeId")
  278. .HasColumnType("int");
  279. b.Property<string>("Status")
  280. .IsRequired()
  281. .HasMaxLength(25)
  282. .HasColumnType("nvarchar(25)");
  283. b.Property<string>("Tel")
  284. .HasColumnType("nvarchar(max)");
  285. b.Property<string>("WorkPlace")
  286. .HasMaxLength(50)
  287. .HasColumnType("nvarchar(50)");
  288. b.HasKey("Id");
  289. b.HasIndex("StaffGradeId");
  290. b.ToTable("Staff");
  291. });
  292. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  293. {
  294. b.Property<int>("Id")
  295. .ValueGeneratedOnAdd()
  296. .HasColumnType("int")
  297. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  298. b.Property<double>("Coefficient")
  299. .HasColumnType("float");
  300. b.Property<string>("Grade")
  301. .IsRequired()
  302. .HasMaxLength(5)
  303. .HasColumnType("nchar(5)")
  304. .IsFixedLength(true);
  305. b.HasKey("Id");
  306. b.ToTable("StaffGrade");
  307. b.HasData(
  308. new
  309. {
  310. Id = 1,
  311. Coefficient = 1.2,
  312. Grade = "S级"
  313. },
  314. new
  315. {
  316. Id = 2,
  317. Coefficient = 1.1000000000000001,
  318. Grade = "A3级"
  319. },
  320. new
  321. {
  322. Id = 3,
  323. Coefficient = 1.1000000000000001,
  324. Grade = "A2级"
  325. },
  326. new
  327. {
  328. Id = 4,
  329. Coefficient = 1.1000000000000001,
  330. Grade = "A1级"
  331. },
  332. new
  333. {
  334. Id = 5,
  335. Coefficient = 1.0,
  336. Grade = "B3级"
  337. },
  338. new
  339. {
  340. Id = 6,
  341. Coefficient = 1.0,
  342. Grade = "B2级"
  343. },
  344. new
  345. {
  346. Id = 7,
  347. Coefficient = 0.90000000000000002,
  348. Grade = "B1级"
  349. },
  350. new
  351. {
  352. Id = 8,
  353. Coefficient = 0.90000000000000002,
  354. Grade = "C3级"
  355. },
  356. new
  357. {
  358. Id = 9,
  359. Coefficient = 0.69999999999999996,
  360. Grade = "C2级"
  361. },
  362. new
  363. {
  364. Id = 10,
  365. Coefficient = 0.69999999999999996,
  366. Grade = "C1级"
  367. },
  368. new
  369. {
  370. Id = 11,
  371. Coefficient = 0.59999999999999998,
  372. Grade = "D3级"
  373. },
  374. new
  375. {
  376. Id = 12,
  377. Coefficient = 0.59999999999999998,
  378. Grade = "D2级"
  379. },
  380. new
  381. {
  382. Id = 13,
  383. Coefficient = 0.5,
  384. Grade = "D1级"
  385. });
  386. });
  387. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  388. {
  389. b.Property<int>("CheckerId")
  390. .HasColumnType("int");
  391. b.Property<int>("DoPersonId")
  392. .HasColumnType("int");
  393. b.Property<double>("Coefficient")
  394. .HasColumnType("float");
  395. b.HasKey("CheckerId", "DoPersonId");
  396. b.HasIndex("DoPersonId");
  397. b.ToTable("VerifyCoefficient");
  398. b.HasData(
  399. new
  400. {
  401. CheckerId = 2,
  402. DoPersonId = 5,
  403. Coefficient = 0.20000000000000001
  404. },
  405. new
  406. {
  407. CheckerId = 2,
  408. DoPersonId = 6,
  409. Coefficient = 0.20000000000000001
  410. },
  411. new
  412. {
  413. CheckerId = 2,
  414. DoPersonId = 7,
  415. Coefficient = 0.20000000000000001
  416. },
  417. new
  418. {
  419. CheckerId = 2,
  420. DoPersonId = 8,
  421. Coefficient = 0.20000000000000001
  422. },
  423. new
  424. {
  425. CheckerId = 2,
  426. DoPersonId = 9,
  427. Coefficient = 0.29999999999999999
  428. },
  429. new
  430. {
  431. CheckerId = 2,
  432. DoPersonId = 10,
  433. Coefficient = 0.29999999999999999
  434. },
  435. new
  436. {
  437. CheckerId = 2,
  438. DoPersonId = 11,
  439. Coefficient = 0.40000000000000002
  440. },
  441. new
  442. {
  443. CheckerId = 2,
  444. DoPersonId = 12,
  445. Coefficient = 0.40000000000000002
  446. },
  447. new
  448. {
  449. CheckerId = 2,
  450. DoPersonId = 13,
  451. Coefficient = 0.5
  452. },
  453. new
  454. {
  455. CheckerId = 3,
  456. DoPersonId = 5,
  457. Coefficient = 0.20000000000000001
  458. },
  459. new
  460. {
  461. CheckerId = 3,
  462. DoPersonId = 6,
  463. Coefficient = 0.20000000000000001
  464. },
  465. new
  466. {
  467. CheckerId = 3,
  468. DoPersonId = 7,
  469. Coefficient = 0.20000000000000001
  470. },
  471. new
  472. {
  473. CheckerId = 3,
  474. DoPersonId = 8,
  475. Coefficient = 0.20000000000000001
  476. },
  477. new
  478. {
  479. CheckerId = 3,
  480. DoPersonId = 9,
  481. Coefficient = 0.29999999999999999
  482. },
  483. new
  484. {
  485. CheckerId = 3,
  486. DoPersonId = 10,
  487. Coefficient = 0.29999999999999999
  488. },
  489. new
  490. {
  491. CheckerId = 3,
  492. DoPersonId = 11,
  493. Coefficient = 0.40000000000000002
  494. },
  495. new
  496. {
  497. CheckerId = 3,
  498. DoPersonId = 12,
  499. Coefficient = 0.40000000000000002
  500. },
  501. new
  502. {
  503. CheckerId = 3,
  504. DoPersonId = 13,
  505. Coefficient = 0.5
  506. },
  507. new
  508. {
  509. CheckerId = 4,
  510. DoPersonId = 5,
  511. Coefficient = 0.20000000000000001
  512. },
  513. new
  514. {
  515. CheckerId = 4,
  516. DoPersonId = 6,
  517. Coefficient = 0.20000000000000001
  518. },
  519. new
  520. {
  521. CheckerId = 4,
  522. DoPersonId = 7,
  523. Coefficient = 0.20000000000000001
  524. },
  525. new
  526. {
  527. CheckerId = 4,
  528. DoPersonId = 8,
  529. Coefficient = 0.20000000000000001
  530. },
  531. new
  532. {
  533. CheckerId = 4,
  534. DoPersonId = 9,
  535. Coefficient = 0.29999999999999999
  536. },
  537. new
  538. {
  539. CheckerId = 4,
  540. DoPersonId = 10,
  541. Coefficient = 0.29999999999999999
  542. },
  543. new
  544. {
  545. CheckerId = 4,
  546. DoPersonId = 11,
  547. Coefficient = 0.40000000000000002
  548. },
  549. new
  550. {
  551. CheckerId = 4,
  552. DoPersonId = 12,
  553. Coefficient = 0.40000000000000002
  554. },
  555. new
  556. {
  557. CheckerId = 4,
  558. DoPersonId = 13,
  559. Coefficient = 0.5
  560. });
  561. });
  562. modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
  563. {
  564. b.HasOne("wispro.sp.entity.Staff", "UploadUser")
  565. .WithMany()
  566. .HasForeignKey("UploadUserId")
  567. .HasConstraintName("FK_AttachFile_UpdateUser")
  568. .OnDelete(DeleteBehavior.Cascade)
  569. .IsRequired();
  570. b.Navigation("UploadUser");
  571. });
  572. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  573. {
  574. b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
  575. .WithMany("Customers")
  576. .HasForeignKey("ResponseManId")
  577. .HasConstraintName("FK_Customer_Staff");
  578. b.Navigation("ResponseMan");
  579. });
  580. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  581. {
  582. b.HasOne("wispro.sp.entity.Staff", "DoPerson")
  583. .WithMany("ItemStaffs")
  584. .HasForeignKey("DoPersonId")
  585. .HasConstraintName("FK_ItemStaff_Staff")
  586. .IsRequired();
  587. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  588. .WithMany("ItemStaffs")
  589. .HasForeignKey("ItemId")
  590. .HasConstraintName("FK_ItemStaff_PerformanceItem")
  591. .IsRequired();
  592. b.Navigation("DoPerson");
  593. b.Navigation("Item");
  594. });
  595. modelBuilder.Entity("wispro.sp.entity.Message", b =>
  596. {
  597. b.HasOne("wispro.sp.entity.Staff", "From")
  598. .WithMany()
  599. .HasForeignKey("FromId")
  600. .HasConstraintName("FK_From_Staff")
  601. .IsRequired();
  602. b.Navigation("From");
  603. });
  604. modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
  605. {
  606. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  607. .WithMany()
  608. .HasForeignKey("ItemId")
  609. .HasConstraintName("FK_MessagePerformanceItem_Item")
  610. .OnDelete(DeleteBehavior.Cascade)
  611. .IsRequired();
  612. b.HasOne("wispro.sp.entity.Message", "Message")
  613. .WithMany("RelatedItem")
  614. .HasForeignKey("MessageId")
  615. .HasConstraintName("FK_MessagePerformanceItem_Message")
  616. .OnDelete(DeleteBehavior.Cascade)
  617. .IsRequired();
  618. b.Navigation("Item");
  619. b.Navigation("Message");
  620. });
  621. modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
  622. {
  623. b.HasOne("wispro.sp.entity.Message", "Message")
  624. .WithMany()
  625. .HasForeignKey("MessageId")
  626. .HasConstraintName("FK_MessageReadRecord_Message")
  627. .IsRequired();
  628. b.HasOne("wispro.sp.entity.Message", null)
  629. .WithMany("To")
  630. .HasForeignKey("MessageId1");
  631. b.HasOne("wispro.sp.entity.Staff", "Staff")
  632. .WithMany()
  633. .HasForeignKey("StaffId")
  634. .HasConstraintName("FK_MessageReadRecord_Staff")
  635. .IsRequired();
  636. b.Navigation("Message");
  637. b.Navigation("Staff");
  638. });
  639. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  640. {
  641. b.HasOne("wispro.sp.entity.CalMonth", "CalMonth")
  642. .WithMany("PerformanceItems")
  643. .HasForeignKey("CalMonthId")
  644. .HasConstraintName("FK_PerformanceItem_CalMonth")
  645. .OnDelete(DeleteBehavior.Cascade)
  646. .IsRequired();
  647. b.HasOne("wispro.sp.entity.Customer", "Customer")
  648. .WithMany("PerformanceItems")
  649. .HasForeignKey("CustomerId")
  650. .HasConstraintName("FK_PerformanceItem_Customer");
  651. b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
  652. .WithMany()
  653. .HasForeignKey("PreOastaffId")
  654. .HasConstraintName("FK_PerformanceItem_Staff");
  655. b.HasOne("wispro.sp.entity.Staff", "Reviewer")
  656. .WithMany("ReviewerItems")
  657. .HasForeignKey("ReviewerId")
  658. .HasConstraintName("FK_PerformanceItem_Reviewer");
  659. b.Navigation("CalMonth");
  660. b.Navigation("Customer");
  661. b.Navigation("PreOastaff");
  662. b.Navigation("Reviewer");
  663. });
  664. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  665. {
  666. b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
  667. .WithMany("Staff")
  668. .HasForeignKey("StaffGradeId")
  669. .HasConstraintName("FK_Staff_StaffGrade")
  670. .IsRequired();
  671. b.Navigation("StaffGrade");
  672. });
  673. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  674. {
  675. b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
  676. .WithMany("VerifyCoefficientCheckers")
  677. .HasForeignKey("CheckerId")
  678. .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
  679. .IsRequired();
  680. b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
  681. .WithMany("VerifyCoefficientDoPeople")
  682. .HasForeignKey("DoPersonId")
  683. .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
  684. .IsRequired();
  685. b.Navigation("Checker");
  686. b.Navigation("DoPerson");
  687. });
  688. modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
  689. {
  690. b.Navigation("PerformanceItems");
  691. });
  692. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  693. {
  694. b.Navigation("PerformanceItems");
  695. });
  696. modelBuilder.Entity("wispro.sp.entity.Message", b =>
  697. {
  698. b.Navigation("RelatedItem");
  699. b.Navigation("To");
  700. });
  701. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  702. {
  703. b.Navigation("ItemStaffs");
  704. });
  705. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  706. {
  707. b.Navigation("Customers");
  708. b.Navigation("ItemStaffs");
  709. b.Navigation("ReviewerItems");
  710. });
  711. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  712. {
  713. b.Navigation("Staff");
  714. b.Navigation("VerifyCoefficientCheckers");
  715. b.Navigation("VerifyCoefficientDoPeople");
  716. });
  717. #pragma warning restore 612, 618
  718. }
  719. }
  720. }