import { PageResult, PageParams } from './common';

export interface TeachingListFilter {
  name: string;
  code: string;
  enable: boolean;
}
export type TeachingListPageParam = PageParams<TeachingListFilter>;

export interface TeachingItem {
  id: number;
  name: string;
  code: string;
  cityId: number;
  cityName: string;
  capacity: number;
  enable: boolean;
}

export type TeachingListPageRes = PageResult<TeachingItem>;

export interface TeachingUpdateParams {
  id?: number;
  name: string;
  code: string;
  cityId: number | null;
}

export interface AgentListFilter {
  teachingId: number | null;
  name: string;
  enable: boolean | undefined;
}
export type AgentListPageParam = PageParams<AgentListFilter>;

export interface AgentItem {
  id: number;
  name: string;
  code: string;
  address: string;
  teachingId: number;
  teachingName: string;
  capacity: number;
  enable: boolean;
}

export type AgentListPageRes = PageResult<AgentItem>;

export interface AgentUpdateParams {
  id?: number;
  name: string;
  code: string;
  address: string;
  teachingId: number | null;
}
export interface AgentGuideUpdateParams {
  id: number;
  guide: string;
}

export interface RoomListFilter {
  teachingId: number | null;
  examSiteId: number | null;
  name: string;
  enable: boolean | undefined;
}
export type RoomListPageParam = PageParams<RoomListFilter>;

export interface RoomItem {
  id: number;
  name: string;
  code: string;
  address: string;
  teachingId: number;
  teachingName: string;
  examSiteId: number;
  examSiteName: string;
  capacity: number;
  enable: boolean;
}

export type RoomListPageRes = PageResult<RoomItem>;

export interface RoomUpdateParams {
  id?: number;
  name: string;
  code: string;
  address: string;
  capacity: number | undefined;
  teachingId: number | null;
  examSiteId: number | null;
}
