spDbContextModelSnapshot.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  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<bool>("IsOnJob")
  259. .HasColumnType("bit");
  260. b.Property<string>("Mail")
  261. .HasColumnType("nvarchar(max)");
  262. b.Property<string>("Memo")
  263. .HasColumnType("nvarchar(max)");
  264. b.Property<string>("Mobile")
  265. .HasColumnType("nvarchar(max)");
  266. b.Property<string>("Name")
  267. .IsRequired()
  268. .HasMaxLength(50)
  269. .HasColumnType("nvarchar(50)");
  270. b.Property<string>("Password")
  271. .IsRequired()
  272. .HasColumnType("nvarchar(max)");
  273. b.Property<string>("Sex")
  274. .HasColumnType("nvarchar(max)");
  275. b.Property<int>("StaffGradeId")
  276. .HasColumnType("int");
  277. b.Property<string>("Status")
  278. .IsRequired()
  279. .HasMaxLength(25)
  280. .HasColumnType("nvarchar(25)");
  281. b.Property<string>("Tel")
  282. .HasColumnType("nvarchar(max)");
  283. b.Property<string>("WorkPlace")
  284. .HasMaxLength(50)
  285. .HasColumnType("nvarchar(50)");
  286. b.HasKey("Id");
  287. b.HasIndex("StaffGradeId");
  288. b.ToTable("Staff");
  289. });
  290. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  291. {
  292. b.Property<int>("Id")
  293. .ValueGeneratedOnAdd()
  294. .HasColumnType("int")
  295. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  296. b.Property<double>("Coefficient")
  297. .HasColumnType("float");
  298. b.Property<string>("Grade")
  299. .IsRequired()
  300. .HasMaxLength(5)
  301. .HasColumnType("nchar(5)")
  302. .IsFixedLength(true);
  303. b.HasKey("Id");
  304. b.ToTable("StaffGrade");
  305. b.HasData(
  306. new
  307. {
  308. Id = 1,
  309. Coefficient = 1.2,
  310. Grade = "S级"
  311. },
  312. new
  313. {
  314. Id = 2,
  315. Coefficient = 1.1000000000000001,
  316. Grade = "A3级"
  317. },
  318. new
  319. {
  320. Id = 3,
  321. Coefficient = 1.1000000000000001,
  322. Grade = "A2级"
  323. },
  324. new
  325. {
  326. Id = 4,
  327. Coefficient = 1.1000000000000001,
  328. Grade = "A1级"
  329. },
  330. new
  331. {
  332. Id = 5,
  333. Coefficient = 1.0,
  334. Grade = "B3级"
  335. },
  336. new
  337. {
  338. Id = 6,
  339. Coefficient = 1.0,
  340. Grade = "B2级"
  341. },
  342. new
  343. {
  344. Id = 7,
  345. Coefficient = 0.90000000000000002,
  346. Grade = "B1级"
  347. },
  348. new
  349. {
  350. Id = 8,
  351. Coefficient = 0.90000000000000002,
  352. Grade = "C3级"
  353. },
  354. new
  355. {
  356. Id = 9,
  357. Coefficient = 0.69999999999999996,
  358. Grade = "C2级"
  359. },
  360. new
  361. {
  362. Id = 10,
  363. Coefficient = 0.69999999999999996,
  364. Grade = "C1级"
  365. },
  366. new
  367. {
  368. Id = 11,
  369. Coefficient = 0.59999999999999998,
  370. Grade = "D3级"
  371. },
  372. new
  373. {
  374. Id = 12,
  375. Coefficient = 0.59999999999999998,
  376. Grade = "D2级"
  377. },
  378. new
  379. {
  380. Id = 13,
  381. Coefficient = 0.5,
  382. Grade = "D1级"
  383. });
  384. });
  385. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  386. {
  387. b.Property<int>("CheckerId")
  388. .HasColumnType("int");
  389. b.Property<int>("DoPersonId")
  390. .HasColumnType("int");
  391. b.Property<double>("Coefficient")
  392. .HasColumnType("float");
  393. b.HasKey("CheckerId", "DoPersonId");
  394. b.HasIndex("DoPersonId");
  395. b.ToTable("VerifyCoefficient");
  396. b.HasData(
  397. new
  398. {
  399. CheckerId = 2,
  400. DoPersonId = 5,
  401. Coefficient = 0.20000000000000001
  402. },
  403. new
  404. {
  405. CheckerId = 2,
  406. DoPersonId = 6,
  407. Coefficient = 0.20000000000000001
  408. },
  409. new
  410. {
  411. CheckerId = 2,
  412. DoPersonId = 7,
  413. Coefficient = 0.20000000000000001
  414. },
  415. new
  416. {
  417. CheckerId = 2,
  418. DoPersonId = 8,
  419. Coefficient = 0.20000000000000001
  420. },
  421. new
  422. {
  423. CheckerId = 2,
  424. DoPersonId = 9,
  425. Coefficient = 0.29999999999999999
  426. },
  427. new
  428. {
  429. CheckerId = 2,
  430. DoPersonId = 10,
  431. Coefficient = 0.29999999999999999
  432. },
  433. new
  434. {
  435. CheckerId = 2,
  436. DoPersonId = 11,
  437. Coefficient = 0.40000000000000002
  438. },
  439. new
  440. {
  441. CheckerId = 2,
  442. DoPersonId = 12,
  443. Coefficient = 0.40000000000000002
  444. },
  445. new
  446. {
  447. CheckerId = 2,
  448. DoPersonId = 13,
  449. Coefficient = 0.5
  450. },
  451. new
  452. {
  453. CheckerId = 3,
  454. DoPersonId = 5,
  455. Coefficient = 0.20000000000000001
  456. },
  457. new
  458. {
  459. CheckerId = 3,
  460. DoPersonId = 6,
  461. Coefficient = 0.20000000000000001
  462. },
  463. new
  464. {
  465. CheckerId = 3,
  466. DoPersonId = 7,
  467. Coefficient = 0.20000000000000001
  468. },
  469. new
  470. {
  471. CheckerId = 3,
  472. DoPersonId = 8,
  473. Coefficient = 0.20000000000000001
  474. },
  475. new
  476. {
  477. CheckerId = 3,
  478. DoPersonId = 9,
  479. Coefficient = 0.29999999999999999
  480. },
  481. new
  482. {
  483. CheckerId = 3,
  484. DoPersonId = 10,
  485. Coefficient = 0.29999999999999999
  486. },
  487. new
  488. {
  489. CheckerId = 3,
  490. DoPersonId = 11,
  491. Coefficient = 0.40000000000000002
  492. },
  493. new
  494. {
  495. CheckerId = 3,
  496. DoPersonId = 12,
  497. Coefficient = 0.40000000000000002
  498. },
  499. new
  500. {
  501. CheckerId = 3,
  502. DoPersonId = 13,
  503. Coefficient = 0.5
  504. },
  505. new
  506. {
  507. CheckerId = 4,
  508. DoPersonId = 5,
  509. Coefficient = 0.20000000000000001
  510. },
  511. new
  512. {
  513. CheckerId = 4,
  514. DoPersonId = 6,
  515. Coefficient = 0.20000000000000001
  516. },
  517. new
  518. {
  519. CheckerId = 4,
  520. DoPersonId = 7,
  521. Coefficient = 0.20000000000000001
  522. },
  523. new
  524. {
  525. CheckerId = 4,
  526. DoPersonId = 8,
  527. Coefficient = 0.20000000000000001
  528. },
  529. new
  530. {
  531. CheckerId = 4,
  532. DoPersonId = 9,
  533. Coefficient = 0.29999999999999999
  534. },
  535. new
  536. {
  537. CheckerId = 4,
  538. DoPersonId = 10,
  539. Coefficient = 0.29999999999999999
  540. },
  541. new
  542. {
  543. CheckerId = 4,
  544. DoPersonId = 11,
  545. Coefficient = 0.40000000000000002
  546. },
  547. new
  548. {
  549. CheckerId = 4,
  550. DoPersonId = 12,
  551. Coefficient = 0.40000000000000002
  552. },
  553. new
  554. {
  555. CheckerId = 4,
  556. DoPersonId = 13,
  557. Coefficient = 0.5
  558. });
  559. });
  560. modelBuilder.Entity("wispro.sp.entity.AttachFile", b =>
  561. {
  562. b.HasOne("wispro.sp.entity.Staff", "UploadUser")
  563. .WithMany()
  564. .HasForeignKey("UploadUserId")
  565. .HasConstraintName("FK_AttachFile_UpdateUser")
  566. .OnDelete(DeleteBehavior.Cascade)
  567. .IsRequired();
  568. b.Navigation("UploadUser");
  569. });
  570. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  571. {
  572. b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
  573. .WithMany("Customers")
  574. .HasForeignKey("ResponseManId")
  575. .HasConstraintName("FK_Customer_Staff");
  576. b.Navigation("ResponseMan");
  577. });
  578. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  579. {
  580. b.HasOne("wispro.sp.entity.Staff", "DoPerson")
  581. .WithMany("ItemStaffs")
  582. .HasForeignKey("DoPersonId")
  583. .HasConstraintName("FK_ItemStaff_Staff")
  584. .IsRequired();
  585. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  586. .WithMany("ItemStaffs")
  587. .HasForeignKey("ItemId")
  588. .HasConstraintName("FK_ItemStaff_PerformanceItem")
  589. .IsRequired();
  590. b.Navigation("DoPerson");
  591. b.Navigation("Item");
  592. });
  593. modelBuilder.Entity("wispro.sp.entity.Message", b =>
  594. {
  595. b.HasOne("wispro.sp.entity.Staff", "From")
  596. .WithMany()
  597. .HasForeignKey("FromId")
  598. .HasConstraintName("FK_From_Staff")
  599. .IsRequired();
  600. b.Navigation("From");
  601. });
  602. modelBuilder.Entity("wispro.sp.entity.MessagePerformanceItem", b =>
  603. {
  604. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  605. .WithMany()
  606. .HasForeignKey("ItemId")
  607. .HasConstraintName("FK_MessagePerformanceItem_Item")
  608. .OnDelete(DeleteBehavior.Cascade)
  609. .IsRequired();
  610. b.HasOne("wispro.sp.entity.Message", "Message")
  611. .WithMany("RelatedItem")
  612. .HasForeignKey("MessageId")
  613. .HasConstraintName("FK_MessagePerformanceItem_Message")
  614. .OnDelete(DeleteBehavior.Cascade)
  615. .IsRequired();
  616. b.Navigation("Item");
  617. b.Navigation("Message");
  618. });
  619. modelBuilder.Entity("wispro.sp.entity.MessageReadRecord", b =>
  620. {
  621. b.HasOne("wispro.sp.entity.Message", "Message")
  622. .WithMany()
  623. .HasForeignKey("MessageId")
  624. .HasConstraintName("FK_MessageReadRecord_Message")
  625. .IsRequired();
  626. b.HasOne("wispro.sp.entity.Message", null)
  627. .WithMany("To")
  628. .HasForeignKey("MessageId1");
  629. b.HasOne("wispro.sp.entity.Staff", "Staff")
  630. .WithMany()
  631. .HasForeignKey("StaffId")
  632. .HasConstraintName("FK_MessageReadRecord_Staff")
  633. .IsRequired();
  634. b.Navigation("Message");
  635. b.Navigation("Staff");
  636. });
  637. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  638. {
  639. b.HasOne("wispro.sp.entity.CalMonth", "CalMonth")
  640. .WithMany("PerformanceItems")
  641. .HasForeignKey("CalMonthId")
  642. .HasConstraintName("FK_PerformanceItem_CalMonth")
  643. .OnDelete(DeleteBehavior.Cascade)
  644. .IsRequired();
  645. b.HasOne("wispro.sp.entity.Customer", "Customer")
  646. .WithMany("PerformanceItems")
  647. .HasForeignKey("CustomerId")
  648. .HasConstraintName("FK_PerformanceItem_Customer");
  649. b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
  650. .WithMany()
  651. .HasForeignKey("PreOastaffId")
  652. .HasConstraintName("FK_PerformanceItem_Staff");
  653. b.HasOne("wispro.sp.entity.Staff", "Reviewer")
  654. .WithMany("ReviewerItems")
  655. .HasForeignKey("ReviewerId")
  656. .HasConstraintName("FK_PerformanceItem_Reviewer");
  657. b.Navigation("CalMonth");
  658. b.Navigation("Customer");
  659. b.Navigation("PreOastaff");
  660. b.Navigation("Reviewer");
  661. });
  662. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  663. {
  664. b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
  665. .WithMany("Staff")
  666. .HasForeignKey("StaffGradeId")
  667. .HasConstraintName("FK_Staff_StaffGrade")
  668. .IsRequired();
  669. b.Navigation("StaffGrade");
  670. });
  671. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  672. {
  673. b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
  674. .WithMany("VerifyCoefficientCheckers")
  675. .HasForeignKey("CheckerId")
  676. .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
  677. .IsRequired();
  678. b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
  679. .WithMany("VerifyCoefficientDoPeople")
  680. .HasForeignKey("DoPersonId")
  681. .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
  682. .IsRequired();
  683. b.Navigation("Checker");
  684. b.Navigation("DoPerson");
  685. });
  686. modelBuilder.Entity("wispro.sp.entity.CalMonth", b =>
  687. {
  688. b.Navigation("PerformanceItems");
  689. });
  690. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  691. {
  692. b.Navigation("PerformanceItems");
  693. });
  694. modelBuilder.Entity("wispro.sp.entity.Message", b =>
  695. {
  696. b.Navigation("RelatedItem");
  697. b.Navigation("To");
  698. });
  699. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  700. {
  701. b.Navigation("ItemStaffs");
  702. });
  703. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  704. {
  705. b.Navigation("Customers");
  706. b.Navigation("ItemStaffs");
  707. b.Navigation("ReviewerItems");
  708. });
  709. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  710. {
  711. b.Navigation("Staff");
  712. b.Navigation("VerifyCoefficientCheckers");
  713. b.Navigation("VerifyCoefficientDoPeople");
  714. });
  715. #pragma warning restore 612, 618
  716. }
  717. }
  718. }