import { ContractVO } from '@/api/edu/contract/types';

export const billingTypeOptions = [
  { label: '按课时', value: 'HOURS', elTagType: 'primary' },
  { label: '按项目', value: 'PROJECT', elTagType: 'success' },
  { label: '按里程碑', value: 'MILESTONE', elTagType: 'warning' },
  { label: '按效果', value: 'EFFECT', elTagType: 'info' }
];

export const serviceCategoryOptions = [
  { label: '强基计划', value: 'STRONG_BASE', elTagType: 'danger' },
  { label: '综合评价', value: 'COMPREHENSIVE', elTagType: 'warning' },
  { label: '竞赛背书', value: 'COMPETITION', elTagType: 'primary' },
  { label: '志愿填报', value: 'VOLUNTEER', elTagType: 'success' },
  { label: '留学规划', value: 'ABROAD', elTagType: 'info' }
];

export const milestoneStatusOptions = [
  { label: '待交付', value: '0', elTagType: 'info' },
  { label: '进行中', value: '1', elTagType: 'warning' },
  { label: '已交付', value: '2', elTagType: 'success' },
  { label: '已跳过', value: '3', elTagType: 'info' }
];

export interface ServiceMilestoneVO {
  id: number | string;
  packageId: number | string;
  milestoneName: string;
  milestoneCode: string;
  orderNum: number;
  plannedAmount: number;
  plannedHours: number;
  deliverableDesc: string;
  status: string;
  remark: string;
}

export interface ServiceMilestoneForm {
  id?: number | string;
  packageId: number | string;
  milestoneName: string;
  milestoneCode: string;
  orderNum: number;
  plannedAmount: number;
  plannedHours: number;
  deliverableDesc: string;
  status: string;
  remark: string;
}

export interface ContractMilestoneVO {
  id: number | string;
  contractId: number | string;
  packageId: number | string;
  milestoneName: string;
  milestoneCode: string;
  orderNum: number;
  plannedAmount: number;
  paidAmount: number;
  actualAmount: number;
  plannedHours: number;
  status: string;
  deliverableUrl: string;
  deliveredBy: number | string;
  deliveredAt: string;
  remark: string;
}

export interface MilestoneDeliverForm {
  id: number | string;
  actualAmount?: number;
  deliverableUrl?: string;
  deliveredBy?: number | string;
  remark?: string;
}

export interface ContractMilestoneExt extends ContractVO {
  milestones?: ContractMilestoneVO[];
}
