Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
92 lines
3.7 KiB
TypeScript
92 lines
3.7 KiB
TypeScript
/**
|
|
* 种子数据(README《种子数据》)—— 纯常量,零 IO。
|
|
* 部署边界:单次部署 ≤50 人、单组织、不做多租户(OS 0.3)。
|
|
*/
|
|
|
|
export const POSITION_SEED = [
|
|
{ code: 'PM', name: '项目经理', note: '定价审批、策略拍板' },
|
|
{ code: 'BD', name: '商务', note: 'RFQ 受理、成本定价、报价议价、情报归档' },
|
|
{ code: 'FAE', name: '现场应用', note: '替代选型' },
|
|
{ code: 'PRM', name: '采购/寻源', note: '渠道寻源' },
|
|
{ code: 'OP', name: '运营', note: '运营支持' },
|
|
/*
|
|
* 测试岗(ADR-011):测试账号单独占一个岗位,**不混进五个业务岗**。
|
|
* 混进去会让轮值把真单派到测试账号头上;单列则彼此不打扰 ——
|
|
* 测试账号靠**工作组绑定**接管整条流的每个岗位,不靠自己占岗。
|
|
*/
|
|
{ code: 'TEST', name: '测试', note: '测试账号专用岗;整条流经工作组绑定落到本人' },
|
|
] as const;
|
|
|
|
export const STAFF_SEED = [
|
|
{ account: 'dingziqiao', name: '丁子乔', position: 'PM' },
|
|
{ account: 'fengbing', name: '冯兵', position: 'BD' },
|
|
{ account: 'wangziming', name: '王梓名', position: 'FAE' },
|
|
{ account: 'linpeixuan', name: '林佩萱', position: 'PRM' },
|
|
{ account: 'liyuanchu', name: '李元初', position: 'OP' },
|
|
// 两个测试账号:各自一个「全岗位指向自己」的工作组,起单即整条流归自己
|
|
{ account: 'AI', name: 'AI', position: 'TEST' },
|
|
{ account: 'Chaihao', name: '柴浩', position: 'TEST' },
|
|
] as const;
|
|
|
|
/** 登录者 = 冯兵(BD);MVP 单组织 cookie session(编码规范 §4 鉴权定调) */
|
|
export const DEFAULT_LOGIN_ACCOUNT = 'fengbing';
|
|
|
|
export type PositionSeed = (typeof POSITION_SEED)[number];
|
|
export type StaffSeed = (typeof STAFF_SEED)[number];
|
|
|
|
/**
|
|
* 岗位默认授权 —— 治理台九功能对 PM 全开,其余岗位只开与其职责相关的读。
|
|
* 任务负责人与被征答人对所涉内容**天然可见**,不靠这里授权(OS 02)。
|
|
*/
|
|
export const POSITION_GRANT_SEED: Readonly<Record<string, ReadonlyArray<{ fn: string; action: 'read' | 'write' | 'govern' }>>> = {
|
|
/** 测试岗与 PM 同权:一个人要走完整条流,还得在治理台看过程 */
|
|
TEST: [
|
|
{ fn: 'task', action: 'govern' },
|
|
{ fn: 'staff', action: 'govern' },
|
|
{ fn: 'process', action: 'govern' },
|
|
{ fn: 'trigger', action: 'govern' },
|
|
{ fn: 'activity', action: 'govern' },
|
|
{ fn: 'tool', action: 'govern' },
|
|
{ fn: 'data', action: 'govern' },
|
|
{ fn: 'memory', action: 'govern' },
|
|
{ fn: 'system', action: 'govern' },
|
|
],
|
|
PM: [
|
|
{ fn: 'task', action: 'govern' },
|
|
{ fn: 'staff', action: 'govern' },
|
|
{ fn: 'process', action: 'govern' },
|
|
{ fn: 'trigger', action: 'govern' },
|
|
{ fn: 'activity', action: 'govern' },
|
|
{ fn: 'tool', action: 'govern' },
|
|
{ fn: 'data', action: 'govern' },
|
|
{ fn: 'memory', action: 'govern' },
|
|
{ fn: 'system', action: 'govern' },
|
|
],
|
|
BD: [
|
|
{ fn: 'task', action: 'read' },
|
|
{ fn: 'data', action: 'read' },
|
|
],
|
|
FAE: [
|
|
{ fn: 'task', action: 'read' },
|
|
{ fn: 'data', action: 'read' },
|
|
],
|
|
PRM: [
|
|
{ fn: 'task', action: 'read' },
|
|
{ fn: 'data', action: 'read' },
|
|
],
|
|
OP: [
|
|
{ fn: 'task', action: 'read' },
|
|
{ fn: 'data', action: 'read' },
|
|
{ fn: 'memory', action: 'read' },
|
|
],
|
|
};
|
|
|
|
/**
|
|
* 测试账号的**独立工作组**(ADR-011)—— 所有岗位都指向本人。
|
|
* 起单即整条流(A1…A7 + 审批点)全部落到自己工位,一个人从头走到尾。
|
|
*/
|
|
export const SOLO_GROUP_ACCOUNTS = ['AI', 'Chaihao'] as const;
|
|
|
|
/** 组要覆盖的岗位 = 业务五岗(测试岗自身不出现在流程包里) */
|
|
export const SOLO_GROUP_POSITIONS = ['PM', 'BD', 'FAE', 'PRM', 'OP'] as const;
|