// ========== 维度 ==========
export interface DimensionResp {
  id: string
  name: string
  desc: string
  weight: number
  status: 0 | 1
  ruleCount: number
  deptId: string
}

export interface DimensionAddReq {
  name: string
  desc: string
  weight: number
  deptId: string
}

export interface DimensionUpdateReq extends DimensionAddReq {
  status: 0 | 1
}

// ========== 细则 ==========
export interface RuleResp {
  id: string
  dimensionId: string
  name: string
  ruleDesc: string
  score: number
  weight: number
  isExtra: boolean
}

export interface RuleAddReq {
  dimensionId: string
  name: string
  ruleDesc: string
  score: number
  weight: number
  isExtra: boolean
}

export interface RuleUpdateReq extends RuleAddReq {}

// ========== 绩效周期 ==========
export interface PeriodResp {
  id: string
  name: string
  startDate: string
  endDate: string
}

// ========== 评估 ==========
export interface EvaluateReq {
  userId: string
  dimensionId: string
  ruleId: string
  periodId: string
}

export interface EvaluateResp {
  id: string // 细则id
  userId: string
  userName: string
  dimensionName: string
  ruleName: string
  periodName: string
  score: number
  aiComment: string
  status: 0 | 1 // 0待反馈 1已反馈
}

// ========== 查询 ==========
export interface EvaluateQuery {
  keyword?: string
  periodId?: string
  dimensionId?: string
  status?: 0 | 1
}

// ========== 反馈 ==========
export interface FeedbackReq {
  evaluateId: string
  level: 0 | 1 | 2
  content: string
  userId: string
}
