20210910105657_spDB0910.Designer.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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("20210910105657_spDB0910")]
  13. partial class spDB0910
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS")
  20. .HasAnnotation("Relational:MaxIdentifierLength", 128)
  21. .HasAnnotation("ProductVersion", "5.0.9")
  22. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  23. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  24. {
  25. b.Property<int>("Id")
  26. .HasColumnType("int");
  27. b.Property<string>("Address")
  28. .HasMaxLength(500)
  29. .HasColumnType("nvarchar(500)");
  30. b.Property<string>("ContactMan")
  31. .HasMaxLength(50)
  32. .HasColumnType("nvarchar(50)");
  33. b.Property<string>("Name")
  34. .IsRequired()
  35. .HasMaxLength(200)
  36. .HasColumnType("nvarchar(200)");
  37. b.Property<string>("Phone")
  38. .HasMaxLength(50)
  39. .HasColumnType("nvarchar(50)");
  40. b.Property<int?>("ResponseManId")
  41. .HasColumnType("int");
  42. b.HasKey("Id");
  43. b.HasIndex("ResponseManId");
  44. b.ToTable("Customer");
  45. });
  46. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  47. {
  48. b.Property<int>("ItemId")
  49. .HasColumnType("int");
  50. b.Property<int>("DoPersonId")
  51. .HasColumnType("int");
  52. b.Property<double>("PerformancePoint")
  53. .HasColumnType("float");
  54. b.HasKey("ItemId", "DoPersonId");
  55. b.HasIndex("DoPersonId");
  56. b.ToTable("ItemStaff");
  57. });
  58. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  59. {
  60. b.Property<int>("Id")
  61. .ValueGeneratedOnAdd()
  62. .HasColumnType("int")
  63. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  64. b.Property<string>("AgentFeedbackMemo")
  65. .HasColumnType("nvarchar(max)");
  66. b.Property<string>("ApplicationName")
  67. .HasMaxLength(200)
  68. .HasColumnType("nvarchar(200)");
  69. b.Property<string>("ApplicationType")
  70. .HasMaxLength(50)
  71. .HasColumnType("nvarchar(50)");
  72. b.Property<decimal?>("BasePoint")
  73. .HasColumnType("numeric(18,2)");
  74. b.Property<string>("BusinessType")
  75. .HasMaxLength(50)
  76. .HasColumnType("nvarchar(50)");
  77. b.Property<string>("CaseCoefficient")
  78. .HasMaxLength(10)
  79. .HasColumnType("nvarchar(10)");
  80. b.Property<string>("CaseName")
  81. .HasMaxLength(500)
  82. .HasColumnType("nvarchar(500)");
  83. b.Property<string>("CaseNo")
  84. .HasMaxLength(50)
  85. .HasColumnType("nvarchar(50)");
  86. b.Property<string>("CaseStage")
  87. .HasMaxLength(50)
  88. .HasColumnType("nvarchar(50)");
  89. b.Property<string>("CaseState")
  90. .HasMaxLength(50)
  91. .HasColumnType("nvarchar(50)");
  92. b.Property<string>("CaseType")
  93. .HasMaxLength(50)
  94. .HasColumnType("nvarchar(50)");
  95. b.Property<int?>("CustomerId")
  96. .HasColumnType("int");
  97. b.Property<DateTime?>("CustomerLimitDate")
  98. .HasColumnType("date");
  99. b.Property<string>("DoItem")
  100. .HasMaxLength(50)
  101. .HasColumnType("nvarchar(50)");
  102. b.Property<string>("DoItemCoefficient")
  103. .HasMaxLength(50)
  104. .HasColumnType("nvarchar(50)");
  105. b.Property<string>("DoItemMemo")
  106. .HasMaxLength(500)
  107. .HasColumnType("nvarchar(500)");
  108. b.Property<string>("DoItemState")
  109. .HasMaxLength(50)
  110. .HasColumnType("nvarchar(50)");
  111. b.Property<DateTime?>("EntrustingDate")
  112. .HasColumnType("date");
  113. b.Property<DateTime?>("FinalizationDate")
  114. .HasColumnType("date");
  115. b.Property<DateTime?>("FinishedDate")
  116. .HasColumnType("date");
  117. b.Property<DateTime?>("FirstDraftDate")
  118. .HasColumnType("date");
  119. b.Property<DateTime?>("InternalDate")
  120. .HasColumnType("date");
  121. b.Property<int>("Month")
  122. .HasColumnType("int");
  123. b.Property<string>("OverDueMemo")
  124. .HasMaxLength(100)
  125. .HasColumnType("nvarchar(100)");
  126. b.Property<int?>("PreOastaffId")
  127. .HasColumnType("int")
  128. .HasColumnName("PreOAStaffId");
  129. b.Property<DateTime?>("ReturnDate")
  130. .HasColumnType("date");
  131. b.Property<int?>("ReviewerId")
  132. .HasColumnType("int");
  133. b.Property<int?>("StaffId")
  134. .HasColumnType("int");
  135. b.Property<int?>("Status")
  136. .HasColumnType("int")
  137. .HasColumnName("status");
  138. b.Property<int>("Year")
  139. .HasColumnType("int");
  140. b.HasKey("Id");
  141. b.HasIndex("CustomerId");
  142. b.HasIndex("PreOastaffId");
  143. b.HasIndex("ReviewerId");
  144. b.HasIndex("StaffId");
  145. b.ToTable("PerformanceItem");
  146. });
  147. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  148. {
  149. b.Property<int>("Id")
  150. .HasColumnType("int");
  151. b.Property<string>("Account")
  152. .IsRequired()
  153. .HasMaxLength(50)
  154. .HasColumnType("nvarchar(50)");
  155. b.Property<string>("Department")
  156. .HasMaxLength(50)
  157. .HasColumnType("nvarchar(50)");
  158. b.Property<DateTime?>("EntyDate")
  159. .HasColumnType("date");
  160. b.Property<bool>("IsCalPerformsnce")
  161. .HasColumnType("bit")
  162. .HasColumnName("isCalPerformsnce");
  163. b.Property<string>("Memo")
  164. .HasColumnType("nvarchar(max)");
  165. b.Property<string>("Name")
  166. .IsRequired()
  167. .HasMaxLength(50)
  168. .HasColumnType("nvarchar(50)");
  169. b.Property<string>("Password")
  170. .IsRequired()
  171. .HasColumnType("nvarchar(max)");
  172. b.Property<int>("StaffGradeId")
  173. .HasColumnType("int");
  174. b.Property<string>("Status")
  175. .IsRequired()
  176. .HasMaxLength(25)
  177. .HasColumnType("nvarchar(25)");
  178. b.Property<string>("WorkPlace")
  179. .HasMaxLength(50)
  180. .HasColumnType("nvarchar(50)");
  181. b.HasKey("Id");
  182. b.HasIndex("StaffGradeId");
  183. b.ToTable("Staff");
  184. });
  185. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  186. {
  187. b.Property<int>("Id")
  188. .ValueGeneratedOnAdd()
  189. .HasColumnType("int")
  190. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  191. b.Property<double>("Coefficient")
  192. .HasColumnType("float");
  193. b.Property<string>("Grade")
  194. .IsRequired()
  195. .HasMaxLength(5)
  196. .HasColumnType("nchar(5)")
  197. .IsFixedLength(true);
  198. b.HasKey("Id");
  199. b.ToTable("StaffGrade");
  200. b.HasData(
  201. new
  202. {
  203. Id = 1,
  204. Coefficient = 1.2,
  205. Grade = "S级"
  206. },
  207. new
  208. {
  209. Id = 2,
  210. Coefficient = 1.1000000000000001,
  211. Grade = "A3级"
  212. },
  213. new
  214. {
  215. Id = 3,
  216. Coefficient = 1.1000000000000001,
  217. Grade = "A2级"
  218. },
  219. new
  220. {
  221. Id = 4,
  222. Coefficient = 1.1000000000000001,
  223. Grade = "A1级"
  224. },
  225. new
  226. {
  227. Id = 5,
  228. Coefficient = 1.0,
  229. Grade = "B3级"
  230. },
  231. new
  232. {
  233. Id = 6,
  234. Coefficient = 1.0,
  235. Grade = "B2级"
  236. },
  237. new
  238. {
  239. Id = 7,
  240. Coefficient = 0.90000000000000002,
  241. Grade = "B1级"
  242. },
  243. new
  244. {
  245. Id = 8,
  246. Coefficient = 0.90000000000000002,
  247. Grade = "C3级"
  248. },
  249. new
  250. {
  251. Id = 9,
  252. Coefficient = 0.69999999999999996,
  253. Grade = "C2级"
  254. },
  255. new
  256. {
  257. Id = 10,
  258. Coefficient = 0.69999999999999996,
  259. Grade = "C1级"
  260. },
  261. new
  262. {
  263. Id = 11,
  264. Coefficient = 0.59999999999999998,
  265. Grade = "D3级"
  266. },
  267. new
  268. {
  269. Id = 12,
  270. Coefficient = 0.59999999999999998,
  271. Grade = "D2级"
  272. },
  273. new
  274. {
  275. Id = 13,
  276. Coefficient = 0.5,
  277. Grade = "D1级"
  278. });
  279. });
  280. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  281. {
  282. b.Property<int>("CheckerId")
  283. .HasColumnType("int");
  284. b.Property<int>("DoPersonId")
  285. .HasColumnType("int");
  286. b.Property<double>("Coefficient")
  287. .HasColumnType("float");
  288. b.HasKey("CheckerId", "DoPersonId");
  289. b.HasIndex("DoPersonId");
  290. b.ToTable("VerifyCoefficient");
  291. b.HasData(
  292. new
  293. {
  294. CheckerId = 2,
  295. DoPersonId = 5,
  296. Coefficient = 0.20000000000000001
  297. },
  298. new
  299. {
  300. CheckerId = 2,
  301. DoPersonId = 6,
  302. Coefficient = 0.20000000000000001
  303. },
  304. new
  305. {
  306. CheckerId = 2,
  307. DoPersonId = 7,
  308. Coefficient = 0.20000000000000001
  309. },
  310. new
  311. {
  312. CheckerId = 2,
  313. DoPersonId = 8,
  314. Coefficient = 0.20000000000000001
  315. },
  316. new
  317. {
  318. CheckerId = 2,
  319. DoPersonId = 9,
  320. Coefficient = 0.29999999999999999
  321. },
  322. new
  323. {
  324. CheckerId = 2,
  325. DoPersonId = 10,
  326. Coefficient = 0.29999999999999999
  327. },
  328. new
  329. {
  330. CheckerId = 2,
  331. DoPersonId = 11,
  332. Coefficient = 0.40000000000000002
  333. },
  334. new
  335. {
  336. CheckerId = 2,
  337. DoPersonId = 12,
  338. Coefficient = 0.40000000000000002
  339. },
  340. new
  341. {
  342. CheckerId = 2,
  343. DoPersonId = 13,
  344. Coefficient = 0.5
  345. },
  346. new
  347. {
  348. CheckerId = 3,
  349. DoPersonId = 5,
  350. Coefficient = 0.20000000000000001
  351. },
  352. new
  353. {
  354. CheckerId = 3,
  355. DoPersonId = 6,
  356. Coefficient = 0.20000000000000001
  357. },
  358. new
  359. {
  360. CheckerId = 3,
  361. DoPersonId = 7,
  362. Coefficient = 0.20000000000000001
  363. },
  364. new
  365. {
  366. CheckerId = 3,
  367. DoPersonId = 8,
  368. Coefficient = 0.20000000000000001
  369. },
  370. new
  371. {
  372. CheckerId = 3,
  373. DoPersonId = 9,
  374. Coefficient = 0.29999999999999999
  375. },
  376. new
  377. {
  378. CheckerId = 3,
  379. DoPersonId = 10,
  380. Coefficient = 0.29999999999999999
  381. },
  382. new
  383. {
  384. CheckerId = 3,
  385. DoPersonId = 11,
  386. Coefficient = 0.40000000000000002
  387. },
  388. new
  389. {
  390. CheckerId = 3,
  391. DoPersonId = 12,
  392. Coefficient = 0.40000000000000002
  393. },
  394. new
  395. {
  396. CheckerId = 3,
  397. DoPersonId = 13,
  398. Coefficient = 0.5
  399. },
  400. new
  401. {
  402. CheckerId = 4,
  403. DoPersonId = 5,
  404. Coefficient = 0.20000000000000001
  405. },
  406. new
  407. {
  408. CheckerId = 4,
  409. DoPersonId = 6,
  410. Coefficient = 0.20000000000000001
  411. },
  412. new
  413. {
  414. CheckerId = 4,
  415. DoPersonId = 7,
  416. Coefficient = 0.20000000000000001
  417. },
  418. new
  419. {
  420. CheckerId = 4,
  421. DoPersonId = 8,
  422. Coefficient = 0.20000000000000001
  423. },
  424. new
  425. {
  426. CheckerId = 4,
  427. DoPersonId = 9,
  428. Coefficient = 0.29999999999999999
  429. },
  430. new
  431. {
  432. CheckerId = 4,
  433. DoPersonId = 10,
  434. Coefficient = 0.29999999999999999
  435. },
  436. new
  437. {
  438. CheckerId = 4,
  439. DoPersonId = 11,
  440. Coefficient = 0.40000000000000002
  441. },
  442. new
  443. {
  444. CheckerId = 4,
  445. DoPersonId = 12,
  446. Coefficient = 0.40000000000000002
  447. },
  448. new
  449. {
  450. CheckerId = 4,
  451. DoPersonId = 13,
  452. Coefficient = 0.5
  453. });
  454. });
  455. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  456. {
  457. b.HasOne("wispro.sp.entity.Staff", "ResponseMan")
  458. .WithMany("Customers")
  459. .HasForeignKey("ResponseManId")
  460. .HasConstraintName("FK_Customer_Staff");
  461. b.Navigation("ResponseMan");
  462. });
  463. modelBuilder.Entity("wispro.sp.entity.ItemStaff", b =>
  464. {
  465. b.HasOne("wispro.sp.entity.Staff", "DoPerson")
  466. .WithMany("ItemStaffs")
  467. .HasForeignKey("DoPersonId")
  468. .HasConstraintName("FK_ItemStaff_Staff")
  469. .IsRequired();
  470. b.HasOne("wispro.sp.entity.PerformanceItem", "Item")
  471. .WithMany("ItemStaffs")
  472. .HasForeignKey("ItemId")
  473. .HasConstraintName("FK_ItemStaff_PerformanceItem")
  474. .IsRequired();
  475. b.Navigation("DoPerson");
  476. b.Navigation("Item");
  477. });
  478. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  479. {
  480. b.HasOne("wispro.sp.entity.Customer", "Customer")
  481. .WithMany("PerformanceItems")
  482. .HasForeignKey("CustomerId")
  483. .HasConstraintName("FK_PerformanceItem_Customer");
  484. b.HasOne("wispro.sp.entity.Staff", "PreOastaff")
  485. .WithMany()
  486. .HasForeignKey("PreOastaffId")
  487. .HasConstraintName("FK_PerformanceItem_Staff");
  488. b.HasOne("wispro.sp.entity.Staff", "Reviewer")
  489. .WithMany("ReviewerItems")
  490. .HasForeignKey("ReviewerId")
  491. .HasConstraintName("FK_PerformanceItem_Reviewer");
  492. b.HasOne("wispro.sp.entity.Staff", null)
  493. .WithMany("PerformanceItems")
  494. .HasForeignKey("StaffId");
  495. b.Navigation("Customer");
  496. b.Navigation("PreOastaff");
  497. b.Navigation("Reviewer");
  498. });
  499. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  500. {
  501. b.HasOne("wispro.sp.entity.StaffGrade", "StaffGrade")
  502. .WithMany("Staff")
  503. .HasForeignKey("StaffGradeId")
  504. .HasConstraintName("FK_Staff_StaffGrade")
  505. .IsRequired();
  506. b.Navigation("StaffGrade");
  507. });
  508. modelBuilder.Entity("wispro.sp.entity.VerifyCoefficient", b =>
  509. {
  510. b.HasOne("wispro.sp.entity.StaffGrade", "Checker")
  511. .WithMany("VerifyCoefficientCheckers")
  512. .HasForeignKey("CheckerId")
  513. .HasConstraintName("FK_VerifyCoefficient_StaffGrade")
  514. .IsRequired();
  515. b.HasOne("wispro.sp.entity.StaffGrade", "DoPerson")
  516. .WithMany("VerifyCoefficientDoPeople")
  517. .HasForeignKey("DoPersonId")
  518. .HasConstraintName("FK_VerifyCoefficient_StaffGrade1")
  519. .IsRequired();
  520. b.Navigation("Checker");
  521. b.Navigation("DoPerson");
  522. });
  523. modelBuilder.Entity("wispro.sp.entity.Customer", b =>
  524. {
  525. b.Navigation("PerformanceItems");
  526. });
  527. modelBuilder.Entity("wispro.sp.entity.PerformanceItem", b =>
  528. {
  529. b.Navigation("ItemStaffs");
  530. });
  531. modelBuilder.Entity("wispro.sp.entity.Staff", b =>
  532. {
  533. b.Navigation("Customers");
  534. b.Navigation("ItemStaffs");
  535. b.Navigation("PerformanceItems");
  536. b.Navigation("ReviewerItems");
  537. });
  538. modelBuilder.Entity("wispro.sp.entity.StaffGrade", b =>
  539. {
  540. b.Navigation("Staff");
  541. b.Navigation("VerifyCoefficientCheckers");
  542. b.Navigation("VerifyCoefficientDoPeople");
  543. });
  544. #pragma warning restore 612, 618
  545. }
  546. }
  547. }