/**
 * 权限常量定义
 * 采用 entity:action 命名规范
 */

// 广告管理权限
export const PERMISSION_ADVERTISEMENT_VIEW = 'advertisement:view';
export const PERMISSION_ADVERTISEMENT_CREATE = 'advertisement:create';
export const PERMISSION_ADVERTISEMENT_EDIT = 'advertisement:edit';
export const PERMISSION_ADVERTISEMENT_DELETE = 'advertisement:delete';
export const PERMISSION_ADVERTISEMENT_MANAGE = 'advertisement:manage';

// 权限常量集合（便于导入）
export const PERMISSIONS = {
  ADVERTISEMENT_VIEW: PERMISSION_ADVERTISEMENT_VIEW,
  ADVERTISEMENT_CREATE: PERMISSION_ADVERTISEMENT_CREATE,
  ADVERTISEMENT_EDIT: PERMISSION_ADVERTISEMENT_EDIT,
  ADVERTISEMENT_DELETE: PERMISSION_ADVERTISEMENT_DELETE,
  ADVERTISEMENT_MANAGE: PERMISSION_ADVERTISEMENT_MANAGE,
} as const;

// 所有权限的数组
export const ALL_PERMISSIONS = [
  PERMISSION_ADVERTISEMENT_VIEW,
  PERMISSION_ADVERTISEMENT_CREATE,
  PERMISSION_ADVERTISEMENT_EDIT,
  PERMISSION_ADVERTISEMENT_DELETE,
  PERMISSION_ADVERTISEMENT_MANAGE,
] as const;

// 类型定义
export type Permission = typeof ALL_PERMISSIONS[number];