import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'
/**
 * @description: Request list interface parameters
 */
export type ProjectListParams = BasicPageParams & { search?: string; insideCategoryId?: string }

export interface ProjectListItem {
  id: string
  code: string
  name: string
  userId: string
  userAccount: string
  categoryId: string
  category: string
  staffId: string
  staffName: string
  staffQq: string
  staffPhone: string
  staffTelephone: string
  createTime: string
  createName: string
  createCategory: string
  insideCategoryId: string
  insideCategory: string
  remark: string
  status: number
  staffIdEncrypted: string
}

export type ProjectUpdateOrCreateParams = {
  id: string
  name: string
  insideCategoryId?: string
  insideCategory: string
  categoryId?: string
  category: string
  staffName: string
  remark: string
  status: string
}

export type ProjectAccountParams = {
  id?: string
  projectId: string
}

export type ProjectAccountItem = {
  id: string
  projectId: string
  bidsectionId: string
  account: string
  password: string
  name: string
  company: string
  position: string
  role: string
  mobile: string
  telephone: string
  isAdmin: number
  jlAuth: number
  accountGroup: number
  enable: number
  contractPermission: string
  qualityPermission: string
  safePermission: string
}

export type AddOrUpdateProjectAccountParams = {
  id?: string
  projectId: string
  account: string
  password?: string
  role: string
  name: string
  company: string
  position: string
  mobile: string
  telephone: string
  isAdmin: number
}

/**
 * @description: Request list return value
 */
export type ProjectListGetResultModel = BasicFetchResult<ProjectListItem[]>
export type ProjectAccountListResultModal = ProjectAccountItem[]
