feat: 初次提交我的项目代码
This commit is contained in:
@@ -363,3 +363,73 @@ export type UserSubscriptionType = {
|
||||
created_at?: string
|
||||
updated_at?: string
|
||||
}
|
||||
export interface Product {
|
||||
id: string
|
||||
name: string
|
||||
description: string | null // 允许null
|
||||
price: number
|
||||
original_price: number | null // 允许null
|
||||
images: string[]
|
||||
// ... 其他属性
|
||||
}
|
||||
// types/mall-types.uts
|
||||
export interface ProductType {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
price: number
|
||||
original_price: number
|
||||
images: string[]
|
||||
category_id: string
|
||||
status: number
|
||||
stock: number
|
||||
sales: number
|
||||
tags: string[]
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface CategoryType {
|
||||
id: string
|
||||
name: string
|
||||
icon_url: string
|
||||
parent_id: string | null
|
||||
is_active: boolean
|
||||
sort_order: number
|
||||
}
|
||||
|
||||
export interface BannerType {
|
||||
id: string
|
||||
title: string
|
||||
image_url: string
|
||||
link_url: string
|
||||
sort_order: number
|
||||
status: number
|
||||
}
|
||||
|
||||
export interface CouponTemplateType {
|
||||
id: string
|
||||
name: string
|
||||
discount_value: number
|
||||
min_order_amount: number
|
||||
start_time: string
|
||||
end_time: string
|
||||
status: number
|
||||
per_user_limit: number
|
||||
}
|
||||
|
||||
export interface CartItemType {
|
||||
id: string
|
||||
user_id: string
|
||||
product_id: string
|
||||
quantity: number
|
||||
created_at: string
|
||||
}
|
||||
|
||||
// Mock 数据类型
|
||||
export interface MockData {
|
||||
banners: BannerType[]
|
||||
categories: CategoryType[]
|
||||
coupons: CouponTemplateType[]
|
||||
products: ProductType[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user