import { z } from 'zod';
import { GoodsSchema, CreateGoodsDto, UpdateGoodsDto } from '../schemas/goods.schema.mt';
import { GoodsCategorySchema, CreateGoodsCategoryDto, UpdateGoodsCategoryDto } from '../schemas/goods-category.schema.mt';
import { RandomGoodsQuery, RandomGoodsResponse } from '../schemas/random.schema.mt';

// 商品相关类型
export type Goods = z.infer<typeof GoodsSchema>;
export type CreateGoods = z.infer<typeof CreateGoodsDto>;
export type UpdateGoods = z.infer<typeof UpdateGoodsDto>;

// 商品分类相关类型
export type GoodsCategory = z.infer<typeof GoodsCategorySchema>;
export type CreateGoodsCategory = z.infer<typeof CreateGoodsCategoryDto>;
export type UpdateGoodsCategory = z.infer<typeof UpdateGoodsCategoryDto>;

// 随机商品相关类型
export type { RandomGoodsQuery, RandomGoodsResponse };

// 商品状态枚举
export enum GoodsState {
  AVAILABLE = 1,
  UNAVAILABLE = 2
}

// 商品类型枚举
export enum GoodsType {
  PHYSICAL = 1,
  VIRTUAL = 2
}

// 商品分类状态枚举
export enum GoodsCategoryState {
  AVAILABLE = 1,
  UNAVAILABLE = 2
}