| 12345678910111213141516171819202122232425262728293031323334353637 |
- namespace Admin.NET.Plugin.AiDOP;
- /// <summary>
- /// S8 业务角色基线种子(灌入 ado_s8_role_permission_config)。
- /// 作为异常类型配置的责任角色来源:tenant_id=0 / factory_id=0 表示全局默认。
- /// </summary>
- [IncreSeed]
- public class S8RolePermissionSeedData : ISqlSugarEntitySeedData<Entity.S8.AdoS8RolePermissionConfig>
- {
- public IEnumerable<Entity.S8.AdoS8RolePermissionConfig> HasData()
- {
- var ct = DateTime.Parse("2026-04-18 00:00:00");
- long seq = 1329908000001L;
- return new[]
- {
- R(seq++, "ROLE_ORDER_PLANNER", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_PRODUCTION_PLANNER", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_PURCHASER", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_WH_INBOUND", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_WH_OUTBOUND", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_QC", "s8:exception:read,s8:exception:assign", ct),
- R(seq++, "ROLE_EQUIP_MAINT", "s8:exception:read,s8:exception:assign", ct),
- };
- }
- private static Entity.S8.AdoS8RolePermissionConfig R(long id, string roleCode, string perms, DateTime ct) =>
- new()
- {
- Id = id,
- TenantId = 0,
- FactoryId = 0,
- RoleCode = roleCode,
- PermissionCodes = perms,
- CreatedAt = ct,
- };
- }
|