feat(attendant): 入驻免身份证材料、城市单选、材料后补与订单池同城过滤
入驻申请只收基本信息(身份证选填、材料全可空),服务城市改为单选白名单(北京/上海/天津/西安,默认北京);新增 POST /attendant-application/mine/materials 材料后补与 PATCH /employee/me/service-area 改城市接口;订单池按陪诊师服务城市过滤(本人已接/被共享不限城市),接单与详情二次校验;appId wxapp-escort-admin 更名为 wxapp_companion。
This commit is contained in:
@@ -26,9 +26,10 @@ const ImageSchema = mongoose.Schema(
|
||||
|
||||
const HealthCertificateSchema = mongoose.Schema(
|
||||
{
|
||||
data: { type: String, required: true, comment: "健康证照片 data URL" },
|
||||
mime: { type: String, enum: ["image/jpeg", "image/png"], required: true, comment: "图片类型" },
|
||||
expireDate: { type: Date, required: true, comment: "健康证有效期至" },
|
||||
// 证件材料允许后补:照片与有效期都可能缺失,是否成对由 handler 校验
|
||||
data: { type: String, comment: "健康证照片 data URL" },
|
||||
mime: { type: String, enum: ["image/jpeg", "image/png"], comment: "图片类型" },
|
||||
expireDate: { type: Date, comment: "健康证有效期至" },
|
||||
},
|
||||
{ _id: false }
|
||||
);
|
||||
@@ -53,20 +54,20 @@ const AttendantApplicationSchema = mongoose.Schema(
|
||||
},
|
||||
idNumber: {
|
||||
type: String,
|
||||
required: true,
|
||||
trim: true,
|
||||
uppercase: true,
|
||||
match: /^\d{17}[\dX]$/,
|
||||
comment: "身份证号",
|
||||
comment: "身份证号(选填,先收基本信息,后续再补)",
|
||||
},
|
||||
sex: { type: String, enum: ["male", "female", ""], default: "", comment: "性别" },
|
||||
serviceAreas: { type: [String], default: [], comment: "服务区域/城市列表" },
|
||||
introduction: { type: String, default: "", maxlength: 200, comment: "个人简介" },
|
||||
},
|
||||
|
||||
// 证件材料允许后补:提交时可为空,审核通过后仍可补传
|
||||
materials: {
|
||||
qualification: { type: ImageSchema, required: true, comment: "资质证书照片" },
|
||||
healthCertificate: { type: HealthCertificateSchema, required: true, comment: "健康证明" },
|
||||
qualification: { type: ImageSchema, comment: "资质证书照片" },
|
||||
healthCertificate: { type: HealthCertificateSchema, comment: "健康证明" },
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user