import { FileItem } from '@/components/UploadFiles/types';

export interface CreateRegulationRuleForm {
  name: string;
  attachment: FileItem[];
  isPush: number | null;
  userGroupList?: number[];
  remark?: string;
  realname?: string | null;
}

export interface CreateRegulationQuery {
  managementType: number;
  name: string;
  attachment?: string;
  isPush?: number | null;
  userGroupList?: string;
  remark?: string;
  effectState: number;
}

export interface UpdateRegulationQuery extends CreateRegulationQuery {
  id: number;
}

export interface CreateNoticeRuleForm extends CreateRegulationRuleForm {
  content: string;
}

export interface CreateNoticeQuery extends CreateRegulationQuery {
  content: string;
}

export interface UpdateNoticeQuery extends CreateNoticeQuery {
  id: number;
}

export interface RegulationDetailResponse {
  id: number;
  name: string;
  attachment: string;
  effectState: number; // 生效状态：0-未生效，1-生效
  pushTime: string;
  isPush: number;
  remark?: string;
  userGroupList?: string;
  creatName: string | null;
}

export interface NoticeDetailResponse extends RegulationDetailResponse {
  content: string;
}

export interface TableSearchQuery {
  searchName: string | null;
  managementType: number; // 管理类型：1-管理规定，2-管理通知
}
