chore(hospital): 补充本院与分院命名注释并加入院区数据维护脚本

明确本院 name 即主体名称、分院才带「主体名称-分院名称」;新增主院区改名与未支付取消订单清理脚本。
This commit is contained in:
lik
2026-11-05 20:16:58 +08:00
parent 52416c5af2
commit 2c79128ca1
4 changed files with 262 additions and 2 deletions
+2 -2
View File
@@ -80,11 +80,11 @@ const buildFudanFields = (fudan) => ({
/**
* Hospital Schema
* 医院基础信息:名称、主体名称、昵称、拼音、省市、地址、电话、科室、等级、复旦综合榜档位。
* 分院/院区按独立医院记录,不设 parentId;名称约定为「主体名称-分院名称」。
* 分院/院区按独立医院记录,不设 parentId;本院 name 为主体名称,分院约定为「主体名称-分院名称」。
*/
const HospitalSchema = mongoose.Schema(
{
name: { type: String, required: true, comment: "医院名称,约定为「主体名称-分院名称」" },
name: { type: String, required: true, comment: "医院名称;本院为主体名称本身,分院约定为「主体名称-分院名称」" },
entityName: { type: String, default: "", index: true, comment: "主体名称;为空时自动取 name 分隔符前的部分" },
nicknames: { type: [String], default: [], comment: "医院常用昵称;同一主体下的院区共享" },
pinyin: { type: String, default: "", index: true, comment: "医院名称全拼(小写无分隔)" },