refactor: 拆分品牌业务类型与页面方案
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Taro builds (acheng-campus-food) (push) Has been cancelled
CI / Taro builds (atelier-solopreneur) (push) Has been cancelled
CI / Taro builds (linjing-editorial) (push) Has been cancelled
CI / Browser regression (push) Has been cancelled
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Taro builds (acheng-campus-food) (push) Has been cancelled
CI / Taro builds (atelier-solopreneur) (push) Has been cancelled
CI / Taro builds (linjing-editorial) (push) Has been cancelled
CI / Browser regression (push) Has been cancelled
This commit is contained in:
1 parent
f02e2cafbb
commit
0d9f4a7d6f
86 files changed
+4111
-1543
No files matched your search
@@ -11,6 +11,7 @@ import {
|
||||
MinLength,
|
||||
Matches,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
} from "class-validator";
|
||||
import { brandTemplateKeys } from "@personal-brand/config";
|
||||
@@ -53,6 +54,26 @@ export class CreateBrandMemberDto {
|
||||
@IsIn(["owner", "editor"]) role!: "owner" | "editor";
|
||||
}
|
||||
|
||||
export class CreateBrandDto {
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
@MaxLength(80)
|
||||
name!: string;
|
||||
|
||||
@IsString()
|
||||
@Matches(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, {
|
||||
message: "slug 只能包含小写字母、数字和连字符",
|
||||
})
|
||||
@MaxLength(80)
|
||||
slug!: string;
|
||||
|
||||
@IsIn(brandTemplateKeys)
|
||||
businessType!: BrandTemplateKey;
|
||||
|
||||
@IsUUID()
|
||||
templatePackageVersionId!: string;
|
||||
}
|
||||
|
||||
export class ChangeAdminPasswordDto {
|
||||
@IsString() currentPassword!: string;
|
||||
@IsString() @MinLength(8) newPassword!: string;
|
||||
|
||||
Reference in new issue
Block a user