storeStatus.ts 851 Bytes
// 门店上架记录状态(PRD §4.2)
// 共五个状态覆盖全部生命周期,其中仅「已生效」可对外展示(门店列表只展示已生效数据)。
export type StoreStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'REVOKED' | 'VOID';

// 状态徽标配色规范(待审批黄 / 已生效蓝 / 已打回红 / 已撤回灰 / 已作废灰)
export const STORE_STATUS: Record<StoreStatus, { label: string; color: string }> = {
  PENDING: { label: '待审批', color: 'gold' },
  APPROVED: { label: '已生效', color: 'blue' },
  REJECTED: { label: '已打回', color: 'red' },
  REVOKED: { label: '已撤回', color: '#8A94A6' },
  VOID: { label: '已作废', color: '#C9CED6' },
};

export const STORE_STATUS_OPTIONS = (Object.keys(STORE_STATUS) as StoreStatus[]).map((k) => ({
  value: k,
  label: STORE_STATUS[k].label,
}));