import { InferRequestType, InferResponseType } from 'hono';
import { advertisementTypeRoutes } from '@d8d/advertisements-module';

// 广告分类实体类型
export interface AdvertisementType {
  id: number;
  name: string;
  code: string;
  remark: string | null;
  status: number;
  createdAt: string;
  updatedAt: string;
  createdBy: number | null;
  updatedBy: number | null;
}

// 广告分类创建请求类型
export type CreateAdvertisementTypeRequest = InferRequestType<typeof advertisementTypeRoutes>['post'];

// 广告分类创建响应类型
export type CreateAdvertisementTypeResponse = InferResponseType<typeof advertisementTypeRoutes>['post'];

// 广告分类更新请求类型
export type UpdateAdvertisementTypeRequest = InferRequestType<typeof advertisementTypeRoutes>['put'];

// 广告分类更新响应类型
export type UpdateAdvertisementTypeResponse = InferResponseType<typeof advertisementTypeRoutes>['put'];

// 广告分类列表响应类型
export type ListAdvertisementTypesResponse = InferResponseType<typeof advertisementTypeRoutes>['get'];

// 广告分类详情响应类型
export type GetAdvertisementTypeResponse = InferResponseType<typeof advertisementTypeRoutes>['/:id']['get'];

// 广告分类删除响应类型
export type DeleteAdvertisementTypeResponse = InferResponseType<typeof advertisementTypeRoutes>['/:id']['delete'];

// 广告分类状态枚举
export enum AdvertisementTypeStatus {
  DISABLED = 0,
  ENABLED = 1
}

// 广告分类表单数据
export interface AdvertisementTypeFormData {
  name: string;
  code: string;
  remark?: string | null;
  status: number;
}

// 广告分类查询参数
export interface AdvertisementTypeQueryParams {
  page?: number;
  limit?: number;
  search?: string;
  status?: number;
}