实现基本产品查询与页面展示
This commit is contained in:
5
src/models/base/model.ts
Normal file
5
src/models/base/model.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type Model = {
|
||||
id: number
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
}
|
||||
12
src/models/product.ts
Normal file
12
src/models/product.ts
Normal 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
12
src/models/product_sku.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user