import { InferRequestType, InferResponseType } from 'hono';
import { bankNameRoutes } from '@d8d/bank-names-module';

// 银行名称实体类型
export interface BankName {
  id: number;
  name: string;
  code: string;
  remark: string | null;
  status: number;
  createdAt: string;
  updatedAt: string;
  createdBy: number | null;
  updatedBy: number | null;
}

// 银行名称创建请求类型
export type CreateBankNameRequest = InferRequestType<typeof bankNameRoutes>['post'];

// 银行名称创建响应类型
export type CreateBankNameResponse = InferResponseType<typeof bankNameRoutes>['post'];

// 银行名称更新请求类型
export type UpdateBankNameRequest = InferRequestType<typeof bankNameRoutes>['put'];

// 银行名称更新响应类型
export type UpdateBankNameResponse = InferResponseType<typeof bankNameRoutes>['put'];

// 银行名称列表响应类型
export type ListBankNamesResponse = InferResponseType<typeof bankNameRoutes>['get'];

// 银行名称详情响应类型
export type GetBankNameResponse = InferResponseType<typeof bankNameRoutes>['/:id']['get'];

// 银行名称删除响应类型
export type DeleteBankNameResponse = InferResponseType<typeof bankNameRoutes>['/:id']['delete'];

// 银行名称状态枚举
export enum BankNameStatus {
  DISABLED = 0,
  ENABLED = 1
}

// 银行名称表单数据
export interface BankNameFormData {
  name: string;
  code: string;
  remark?: string | null;
  status: number;
}

// 银行名称查询参数
export interface BankNameQueryParams {
  page?: number;
  limit?: number;
  search?: string;
  status?: number;
}