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 | undefined;
  capacity: number | undefined;
  enable?: boolean;
}

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;
  guide: string;
  enable: boolean;
}

export type AgentListPageRes = PageResult<AgentItem>;

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

export interface RoomListFilter {
  teachingId: number;
  agentId: number;
  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;
  agentId: number;
  agentName: 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;
  agentId: number | null;
  enable?: boolean;
}
