feat: 支持商品管理

This commit is contained in:
richarjiang
2026-09-16 22:49:47 +08:00
parent 58c6d2092a
commit 95b9f6511c
30 changed files with 2800 additions and 5 deletions

View File

@@ -138,3 +138,5 @@ export type {
export * from './types/member-care'
export * from './types/body-portrait'
export * from './types/shop'

View File

@@ -0,0 +1,53 @@
/** All money values are integer fen. Stock excludes pending reservations. */
export interface ShopProduct {
id: string
title: string
description: string
coverUrl: string
price: number
stock: number
sold: number
isActive: boolean
sortOrder: number
version: number
}
export type ShopOrderStatus = 'PENDING' | 'PAID' | 'COMPLETED' | 'CANCELLED'
export interface ShopOrder {
id: string
orderNo: string
productId: string
title: string
coverUrl: string
unitPrice: number
quantity: number
amount: number
contactName: string
contactPhone: string
status: ShopOrderStatus
pickupCode: string
expiresAt: string
createdAt: string
paidAt: string | null
completedAt: string | null
}
export interface ShopPage<T> {
items: T[]
total: number
page: number
limit: number
}
export interface ShopSummary {
revenue: number
quantity: number
orders: number
pendingPickup: number
activeProducts: number
lowStock: number
}
export interface ShopStockChange {
id: string
delta: number
reason: string
operatorId: string
createdAt: string
}

View File

@@ -12,7 +12,7 @@ export interface StudioConfig {
readonly updatedAt: string
}
export type StudioAssetType = 'gallery' | 'logo' | 'banner' | 'card-cover'
export type StudioAssetType = 'gallery' | 'logo' | 'banner' | 'product-cover' | 'card-cover'
export interface UpdateStudioConfigDto {
readonly name?: string