spDbContextModelSnapshot.cs 31 KB

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