Files
mall-admin/src/types/mall.ts
魔方熊成祥 5d30ea097d 1
2026-05-07 22:54:07 +08:00

514 lines
10 KiB
TypeScript

export type EnabledStatus = 'enabled' | 'disabled'
export type AuditStatus = 'pending' | 'approved' | 'rejected'
export type SettleStatus = 'pending' | 'active' | 'frozen'
export type SaleStatus = 'off' | 'on'
export type HomePositionCode =
| 'home_top'
| 'home_rank_store'
| 'home_featured_store'
| 'home_recommend_goods'
export type RecommendMerchantPositionCode = 'home_rank_store' | 'home_featured_store'
export type RecommendStorePositionCode = RecommendMerchantPositionCode
export type MerchantLoginType = '0' | '1'
export type LinkType = 'goods' | 'store' | 'topic' | 'h5'
export type OrderStatus =
| 'pending_pay'
| 'paid_wait_ship'
| 'shipped'
| 'finished'
| 'canceled'
| 'after_sale'
| 'refund_finished'
export type AfterSaleStatus =
| 'none'
| 'pending'
| 'approved'
| 'rejected'
| 'refunding'
| 'finished'
| 'closed'
export interface PageResult<T> {
total: number
list: T[]
}
export interface MerchantInfo {
id: string
uid: string
merchantNo: string
merchantName: string
status: EnabledStatus
auditStatus: AuditStatus
settleStatus: SettleStatus
contactName: string
contactMobile: string
contactEmail: string
licenseNo: string
licenseImagesJson: string
extraInfoJson: string
remark: string
logo?: string
notice?: string
approvedAt: number
createdAt: number
updatedAt: number
}
export interface StoreInfo {
id: string
merchantId: string
storeNo: string
storeName: string
storeLogo: string
storeBanner: string
storeNotice: string
storeStatus: EnabledStatus
auditStatus: AuditStatus
servicePhone: string
serviceEmail: string
contactName: string
contactMobile: string
province: string
city: string
district: string
addressDetail: string
zipCode: string
sort: number
createdAt: number
updatedAt: number
}
export interface GoodsSummary {
id: string
merchantId: string
storeId: string
categoryId: string
categoryName?: string
spuNo: string
spuName: string
subTitle: string
coverUrl: string
status: EnabledStatus
auditStatus: AuditStatus
saleStatus: SaleStatus
sort: number
salesVolume: number
virtualSales: number
viewCount: number
minPrice: string
maxPrice: string
totalStock: number
lockedStock: number
createdAt: number
updatedAt: number
}
export interface OrderItemInfo {
id: string
orderId: string
tradeId: string
orderNo: string
spuId: string
skuId: string
spuName: string
skuName: string
coverUrl: string
skuSpecJson: string
buyNum: number
salePrice: string
originPrice: string
discountAmount: string
itemAmount: string
refundAmount: string
afterSaleStatus: AfterSaleStatus
}
export interface OrderSummary {
id: string
tradeId: string
tradeNo: string
orderNo: string
memberId: string
uid?: string
merchantId: string
storeId: string
merchantName?: string
storeName: string
orderStatus: OrderStatus
afterSaleStatus: AfterSaleStatus
currency: string
goodsAmount: string
freightAmount: string
discountAmount: string
payAmount: string
payTime: number
shipTime: number
finishTime: number
cancelTime: number
createdAt: number
updatedAt: number
}
export interface OrderDetailInfo {
id: string
tradeId: string
tradeNo: string
orderNo: string
memberId: string
uid?: string
merchantId: string
storeId: string
merchantName?: string
storeName: string
orderStatus: OrderStatus
afterSaleStatus: AfterSaleStatus
currency: string
goodsAmount: string
freightAmount: string
discountAmount: string
payAmount: string
buyerRemark: string
sellerRemark: string
receiverName: string
receiverMobile: string
receiverCountryCode: string
receiverProvince: string
receiverCity: string
receiverDistrict: string
receiverAddress: string
receiverZipCode: string
deliveryCompany: string
deliveryNo: string
payChannel: string
extraInfoJson: string
payTime: number
shipTime: number
finishTime: number
cancelTime: number
autoConfirmAt: number
items: OrderItemInfo[]
createdAt: number
updatedAt: number
}
export interface AdminMerchantPageParams {
keyword?: string
status?: EnabledStatus
auditStatus?: AuditStatus
page: number
size: number
}
export interface AdminMerchantCreateParams {
loginType: MerchantLoginType
account: string
password: string
merchantName: string
contactName: string
contactMobile?: string
contactEmail?: string
licenseNo?: string
licenseImagesJson?: string
extraInfoJson?: string
remark?: string
createIp?: string
}
export interface AdminMerchantAuditParams {
merchantId: string
auditStatus: Extract<AuditStatus, 'approved' | 'rejected'>
remark?: string
operatorId: string
}
export interface AdminStorePageParams {
merchantId?: string
keyword?: string
storeStatus?: EnabledStatus
auditStatus?: AuditStatus
page: number
size: number
}
export interface AdminStoreAuditParams {
storeId: string
auditStatus: Extract<AuditStatus, 'approved' | 'rejected'>
remark?: string
operatorId: string
}
export interface AdminGoodsPageParams {
merchantId?: string
storeId?: string
keyword?: string
auditStatus?: AuditStatus
saleStatus?: SaleStatus
page: number
size: number
}
export interface AdminGoodsAuditParams {
spuId: string
auditStatus: Extract<AuditStatus, 'approved' | 'rejected'>
remark?: string
operatorId: string
}
export interface AdminOrderPageParams {
merchantId?: string
storeId?: string
tradeNo?: string
orderNo?: string
orderStatus?: OrderStatus
afterSaleStatus?: AfterSaleStatus
page: number
size: number
}
export interface AdminOrderDetailParams {
orderId: string
}
export interface AdminCategoryItem {
id: string
parentId: string
categoryName: string
categoryLevel: number
categoryPath: string
categoryIcon: string
isLeaf: boolean
sort: number
status: EnabledStatus
goodsCount: number
createdAt: number
updatedAt: number
children: AdminCategoryItem[]
}
export interface AdminCategoryTreeParams {
status?: EnabledStatus
}
export interface AdminCategorySaveParams {
id?: string
parentId?: string
categoryName: string
categoryIcon?: string
sort?: number
status: EnabledStatus
}
export interface AdminCategoryDeleteParams {
id: string
}
export interface AdminRecommendStoreItem {
id: string
positionCode: RecommendStorePositionCode
storeId: string
merchantId: string
storeName: string
storeLogo: string
storeNotice: string
storeStatus: EnabledStatus
auditStatus: AuditStatus
mainCategoryName: string
recommendReason: string
rankScore: number
sort: number
configStatus: EnabledStatus
startTime: number
endTime: number
createdAt: number
updatedAt: number
}
export interface AdminRecommendStorePageParams {
keyword?: string
positionCode?: RecommendStorePositionCode
status?: EnabledStatus
merchantId?: string
page: number
size: number
}
export interface AdminRecommendStoreSaveParams {
id?: string
positionCode: RecommendStorePositionCode
storeId: string
mainCategoryName?: string
recommendReason?: string
rankScore?: number
sort?: number
status: EnabledStatus
startTime?: number
endTime?: number
}
export interface AdminRecommendStoreDeleteParams {
id: string
}
export interface AdminBannerItem {
id: string
title: string
subTitle: string
description: string
buttonText: string
positionCode: Extract<HomePositionCode, 'home_top'>
imageUrl: string
linkType: LinkType | string
linkValue: string
sort: number
status: EnabledStatus
startTime: number
endTime: number
createdAt: number
updatedAt: number
}
export interface AdminBannerPageParams {
keyword?: string
positionCode?: Extract<HomePositionCode, 'home_top'>
status?: EnabledStatus
page: number
size: number
}
export interface AdminBannerSaveParams {
id?: string
title: string
subTitle?: string
description?: string
buttonText?: string
positionCode: Extract<HomePositionCode, 'home_top'>
imageUrl: string
linkType?: LinkType | string
linkValue?: string
sort?: number
status?: EnabledStatus
startTime?: number
endTime?: number
}
export interface AdminBannerDeleteParams {
id: string
}
export interface AdminRecommendMerchantItem {
id: string
positionCode: RecommendMerchantPositionCode
merchantId: string
merchantName: string
logo: string
notice: string
merchantStatus: EnabledStatus
auditStatus: AuditStatus
mainCategoryName: string
recommendReason: string
rankScore: number
sort: number
configStatus: EnabledStatus
startTime: number
endTime: number
createdAt: number
updatedAt: number
}
export interface AdminRecommendMerchantPageParams {
keyword?: string
positionCode?: RecommendMerchantPositionCode
status?: EnabledStatus
merchantId?: string
page: number
size: number
}
export interface AdminRecommendMerchantSaveParams {
id?: string
positionCode: RecommendMerchantPositionCode
merchantId: string
mainCategoryName?: string
recommendReason?: string
rankScore?: number
sort?: number
status?: EnabledStatus
startTime?: number
endTime?: number
}
export interface AdminRecommendMerchantDeleteParams {
id: string
}
export interface AdminSearchKeywordItem {
id: string
keyword: string
sort: number
status: EnabledStatus
startTime: number
endTime: number
createdAt: number
updatedAt: number
}
export interface AdminSearchKeywordPageParams {
keyword?: string
status?: EnabledStatus
page: number
size: number
}
export interface AdminSearchKeywordSaveParams {
id?: string
keyword: string
sort?: number
status?: EnabledStatus
startTime?: number
endTime?: number
}
export interface AdminSearchKeywordDeleteParams {
id: string
}
export interface AdminHomeChannelItem {
id: string
title: string
subTitle: string
iconUrl: string
linkType: LinkType | string
linkValue: string
sort: number
status: EnabledStatus
startTime: number
endTime: number
createdAt: number
updatedAt: number
}
export interface AdminHomeChannelPageParams {
keyword?: string
status?: EnabledStatus
page: number
size: number
}
export interface AdminHomeChannelSaveParams {
id?: string
title: string
subTitle?: string
iconUrl?: string
linkType?: LinkType | string
linkValue?: string
sort?: number
status?: EnabledStatus
startTime?: number
endTime?: number
}
export interface AdminHomeChannelDeleteParams {
id: string
}