fix: 校验咨询表单关联业务并修正发布清单文案

- 关联的业务提供项必须存在且属于当前品牌,非法 id 返回 400 而不是数据库外键错误
- targetType 由 offeringId 推导,允许传 null 改回品牌通用入口
- 业务被停用时在发布准备度里点名说明,避免静默卡住发布
- 发布清单条目改为中性描述,是否达标交给状态标签表达
This commit is contained in:
que01 committed 2026-10-14 13:55:00 +08:00
1 parent 47d6309cba
commit 7b1e9eee47
6 files changed
+223 -25

No files matched your search

+3 -2
View File
@@ -184,7 +184,7 @@ export class UpdateFieldDefinitionDto {
export class CreateInquiryFormDto {
@IsString() name!: string;
@IsOptional() @IsString() offeringId?: string;
@IsOptional() @IsString() offeringId?: string | null;
@IsOptional() @IsIn(["inquiry", "booking", "quote-request"]) purpose?: string;
@IsOptional() @IsIn(["brand", "offering"]) targetType?: string;
@IsOptional()
@@ -196,7 +196,8 @@ export class CreateInquiryFormDto {
export class UpdateInquiryFormDto {
@IsOptional() @IsString() name?: string;
@IsOptional() @IsString() offeringId?: string;
// 允许显式传 null 表示「改回品牌通用入口」,因此不能只用 @IsString。
@IsOptional() @IsString() offeringId?: string | null;
@IsOptional() @IsIn(["inquiry", "booking", "quote-request"]) purpose?: string;
@IsOptional() @IsIn(["brand", "offering"]) targetType?: string;
@IsOptional()