实现基本产品查询与页面展示

This commit is contained in:
2026-03-23 17:49:47 +08:00
parent c4e1da8912
commit 8751ac19a6
9 changed files with 236 additions and 6 deletions

5
src/models/base/model.ts Normal file
View File

@@ -0,0 +1,5 @@
export type Model = {
id: number
created_at: Date
updated_at: Date
}

12
src/models/product.ts Normal file
View File

@@ -0,0 +1,12 @@
import type { Model } from "./base/model"
import type { ProductSku } from "./product_sku"
export type Product = Model & {
code: string
name: string
description?: string
sort: number
status: number
skus?: ProductSku[]
}

12
src/models/product_sku.ts Normal file
View File

@@ -0,0 +1,12 @@
import type { Model } from "./base/model"
import type { Product } from "./product"
export type ProductSku = Model & {
product_id: number
code: string
name: string
price: string
discount: number
product?: Product
}