import request from '@/config/axios'

// 物资借还查询参数
export interface LoanQuery {
  current: number
  size: number
  materialsName?: string
  loanUserId?: string
  loanState?: number
  startTime?: Date
  endTime?: Date
}

// 物资借还表单对象
export interface LoanVO {
  materialsLoanId?: number
  materialsId: number
  materialsName: string
  loanUserId: string
  loanUserName: string
  loanState: number
  loanTime: Date
  expectedReturnTime: Date
  actualReturnTime?: Date
  restitutionToId?: string
  restitutionUserId?: string
  restitutionUserName?: string
  remark?: string
  createTime?: Date
}

// 归还提醒表单对象
export interface ReturnReminderVO {
  reminderId?: number
  materialsLoanId: number
  reminderTime: Date
  reminderStatus: number
  reminderContent: string
  remark?: string
  createTime?: Date
}

// 查询物资借还列表
export const listLoan = async (params: LoanQuery) => {
  return await request.get({ url: '/iscs/materials-loan/getMaterialsLoanPage', params })
}






