feat: 支持画廊图片更新

This commit is contained in:
richarjiang
2026-04-15 13:58:51 +08:00
parent 7ce7cef77c
commit 6ab16f508a
20 changed files with 1671 additions and 247 deletions

View File

@@ -1,6 +1,14 @@
/** 默认免费取消截止小时数 */
export const DEFAULT_CANCEL_HOURS_LIMIT = 2
/** 默认工作室画廊图片 */
export const DEFAULT_STUDIO_GALLERY_PHOTOS = [
'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/mp/images/place_1.jpg',
'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/mp/images/place_2.jpg',
'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/mp/images/place_3.jpg',
'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/mp/images/place_4.jpg',
] as const
/** 默认时段容量(私教 = 1 */
export const DEFAULT_SLOT_CAPACITY = 1

View File

@@ -15,6 +15,7 @@ export {
// Constants
export {
DEFAULT_CANCEL_HOURS_LIMIT,
DEFAULT_STUDIO_GALLERY_PHOTOS,
DEFAULT_SLOT_CAPACITY,
SLOT_GENERATION_DAYS,
TIME_PERIODS,
@@ -53,7 +54,10 @@ export type {
PaymentParams,
CreateOrderResponse,
StudioConfig,
StudioAssetType,
UpdateStudioConfigDto,
CreateStudioUploadCredentialDto,
StudioUploadCredential,
ApiResponse,
PaginatedData,
PaginatedResponse,

View File

@@ -13,7 +13,13 @@ export type { WeekTemplate, WeekTemplateInput } from './week-template'
export type { TimeSlot, TimeSlotWithBookingStatus, CreateManualSlotDto, ScheduleSlotPreview, PublishDaySlotItem, PublishDaySlotsDto } from './time-slot'
export type { Booking, BookingWithDetails, BookingWithUser, BookingStatusHistory, CreateBookingDto } from './booking'
export type { Order, OrderWithDetails, CreateOrderDto, PaymentParams, CreateOrderResponse } from './order'
export type { StudioConfig, UpdateStudioConfigDto } from './studio'
export type {
StudioConfig,
StudioAssetType,
UpdateStudioConfigDto,
CreateStudioUploadCredentialDto,
StudioUploadCredential,
} from './studio'
export type { ApiResponse, PaginatedData, PaginatedResponse, PaginationQuery } from './api'
export type {
FlashSale,

View File

@@ -12,6 +12,8 @@ export interface StudioConfig {
readonly updatedAt: string
}
export type StudioAssetType = 'gallery' | 'logo' | 'banner'
export interface UpdateStudioConfigDto {
readonly name?: string
readonly logo?: string
@@ -23,3 +25,20 @@ export interface UpdateStudioConfigDto {
readonly cancelHoursLimit?: number
readonly photos?: string[]
}
export interface CreateStudioUploadCredentialDto {
readonly fileName: string
readonly contentType?: string
readonly assetType?: StudioAssetType
}
export interface StudioUploadCredential {
readonly bucket: string
readonly region: string
readonly key: string
readonly uploadUrl: string
readonly fileUrl: string
readonly assetType: StudioAssetType
readonly expiresAt: number
readonly formData: Readonly<Record<string, string>>
}