1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.talentcard.server.business.merchant;
 
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
 
public record MerchantOnboardingRequest(
        @NotBlank @Pattern(regexp = "enterprise|individual") String subjectType,
        @NotBlank @Size(max = 128) String subjectName,
        @Size(max = 32) String creditCode,
        @Size(max = 32) String subjectIdNumber,
        @Pattern(regexp = "|fixed|long_term") String subjectCertificateValidityType,
        @Pattern(regexp = "|\\d{4}-\\d{2}-\\d{2}") String subjectCertificateBeginDate,
        @Pattern(regexp = "|\\d{4}-\\d{2}-\\d{2}") String subjectCertificateEndDate,
        @Pattern(regexp = "|fixed|long_term") String licenseValidityType,
        @Pattern(regexp = "|\\d{4}-\\d{2}-\\d{2}") String licenseBeginDate,
        @Pattern(regexp = "|\\d{4}-\\d{2}-\\d{2}") String licenseEndDate,
        @Size(max = 128) String registeredRegion,
        @Pattern(regexp = "|\\d{6}") String registeredProvinceCode,
        @Pattern(regexp = "|\\d{6}") String registeredCityCode,
        @Pattern(regexp = "|\\d{6}") String registeredDistrictCode,
        @Size(max = 255) String registeredAddress,
        @Size(max = 128) String merchantName,
        @Size(max = 128) String merchantShortName,
        @Size(max = 64) String companyType,
        @Size(max = 512) String businessLicenseUrl,
        @Pattern(regexp = "|\\d{4}-\\d{2}-\\d{2}") String establishedDate,
        @Size(max = 64) String registeredCapital,
        @Size(max = 512) String legalIdFrontUrl,
        @Size(max = 512) String legalIdBackUrl,
        @Size(max = 255) String legalCertificateAddress,
        // 法人本人手机号。微信实名认证走法人(contact_type=LEGAL)时必填,且必须是法人自己的号码;
        // 与 contactMobile(联系人)是两个不同的人,不要把联系人号码当作法人号码填进来。
        // 进件时选填,发起实名时校验必填。
        @Pattern(regexp = "|1\\d{10}") String legalMobile,
        @Size(max = 32) String administratorEmail,
        @NotBlank @Size(max = 64) String contactName,
        @NotBlank @Pattern(regexp = "1\\d{10}") String contactMobile,
        @NotBlank @Pattern(regexp = "\\d{16,32}") String bankCardNumber,
        @NotBlank @Pattern(regexp = "\\d{6}") String bankProvinceCode,
        @NotBlank @Pattern(regexp = "\\d{6}") String bankCityCode,
        @NotBlank @Pattern(regexp = "\\d{12}") String bankBranchCode,
        @Size(max = 512) String settlementCardFrontUrl,
        @Size(max = 512) String registrationAccountUrl,
        // 门店照片:**线下经营的材料是一组三张**(门头照 F22、内景照 F24、收银台 F105),
        // 通道在进件这一步就按 F-code 逐张核对,缺一张整笔驳回;企业与个人主体都要交。
        @Size(max = 512) String storeHeaderUrl,
        @Size(max = 512) String storeIndoorUrl,
        // 经营详细地址(进件的 detail_addr):线下口径下个人(小微)商户必填。它**不是**证件地址——
        // registeredAddress 走通道的 legal_addr,两个字段在通道侧语义不同,不要互相顶替。
        // 放在记录末尾是为了不动既有构造点的参数位置(见 MerchantExistingOnboardingTests 的工厂方法)。
        @Size(max = 255) String businessAddress,
        // 店铺收银台照片(F105):线下经营门店材料三张里的第三张。同样放末尾,不动既有构造点。
        @Size(max = 512) String storeCashierUrl
) {}