import { z } from '@hono/zod-openapi';
import { DeliveryAddressSchema, CreateDeliveryAddressDto, UpdateDeliveryAddressDto } from '../schemas';

export type DeliveryAddress = z.infer<typeof DeliveryAddressSchema>;
export type CreateDeliveryAddressDto = z.infer<typeof CreateDeliveryAddressDto>;
export type UpdateDeliveryAddressDto = z.infer<typeof UpdateDeliveryAddressDto>;

// 状态枚举
export enum DeliveryAddressStatus {
  NORMAL = 1,
  DISABLED = 2,
  DELETED = 3
}

// 默认地址枚举
export enum IsDefaultEnum {
  NOT_DEFAULT = 0,
  IS_DEFAULT = 1
}

// 地址查询参数
export interface FindDeliveryAddressParams {
  userId: number;
  state?: DeliveryAddressStatus;
}

// 设置默认地址参数
export interface SetDefaultAddressParams {
  id: number;
  userId: number;
}