S0OrgSeedData.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. namespace Admin.NET.Plugin.AiDOP;
  2. using Admin.NET.Plugin.AiDOP.Service.S8.OrderFlow;
  3. /// <summary>
  4. /// S0 示范组织节点种子(灌入 SysOrg,公司 Type=201 / 工厂 Type=501)
  5. /// </summary>
  6. [IncreSeed]
  7. public class S0OrgSeedData : ISqlSugarEntitySeedData<SysOrg>
  8. {
  9. private const long S0CompanyId = 1329900200001L;
  10. private const long S0Factory1Id = 1329900200002L;
  11. private const long S0Factory2Id = 1329900200003L;
  12. public IEnumerable<SysOrg> HasData()
  13. {
  14. var ct = DateTime.Parse("2022-02-10 00:00:00");
  15. var tenantId = OrderFlowConstants.DemoTenantId;
  16. return new[]
  17. {
  18. new SysOrg
  19. {
  20. Id = S0CompanyId,
  21. Pid = OrderFlowConstants.DemoRootOrgId,
  22. Name = "S0示范公司",
  23. Code = "S0-C001",
  24. Type = "201",
  25. Level = 2,
  26. OrderNo = 200,
  27. Status = StatusEnum.Enable,
  28. Remark = "S0 运营建模示范公司",
  29. TenantId = tenantId,
  30. CreateTime = ct,
  31. },
  32. new SysOrg
  33. {
  34. Id = S0Factory1Id,
  35. Pid = S0CompanyId,
  36. Name = "一工厂",
  37. Code = "S0-F001",
  38. Type = "501",
  39. Level = 3,
  40. OrderNo = 201,
  41. Status = StatusEnum.Enable,
  42. Remark = "S0 示范工厂 1",
  43. TenantId = tenantId,
  44. CreateTime = ct,
  45. },
  46. new SysOrg
  47. {
  48. Id = S0Factory2Id,
  49. Pid = S0CompanyId,
  50. Name = "二工厂",
  51. Code = "S0-F002",
  52. Type = "501",
  53. Level = 3,
  54. OrderNo = 202,
  55. Status = StatusEnum.Enable,
  56. Remark = "S0 示范工厂 2",
  57. TenantId = tenantId,
  58. CreateTime = ct,
  59. },
  60. };
  61. }
  62. }