add trim schema

This commit is contained in:
崔红保 2020-12-23 20:20:34 +08:00
parent 4e3a6696f5
commit 36c2f94ae5
16 changed files with 101 additions and 47 deletions

View File

@ -11,19 +11,23 @@
}, },
"menu_id": { "menu_id": {
"bsonType": "string", "bsonType": "string",
"description": "菜单项的ID不可重复" "description": "菜单项的ID不可重复",
"trim":"both"
}, },
"name": { "name": {
"bsonType": "string", "bsonType": "string",
"description": "菜单名称" "description": "菜单名称",
"trim":"both"
}, },
"icon": { "icon": {
"bsonType": "string", "bsonType": "string",
"description": "菜单图标" "description": "菜单图标",
"trim":"both"
}, },
"url": { "url": {
"bsonType": "string", "bsonType": "string",
"description": "菜单url" "description": "菜单url",
"trim":"both"
}, },
"sort": { "sort": {
"bsonType": "int", "bsonType": "int",

View File

@ -11,19 +11,22 @@
"image_url": { "image_url": {
"bsonType": "string", "bsonType": "string",
"description": "图片url。可以是在线地址也支持本地地址", "description": "图片url。可以是在线地址也支持本地地址",
"label": "图片url" "label": "图片url",
"trim":"both"
}, },
"open_url": { "open_url": {
"bsonType": "string", "bsonType": "string",
"description": "点击跳转目标地址。如果是web地址则使用内置web-view打开如果是本地页面则跳转本地页面如果是schema地址则打开本地的app", "description": "点击跳转目标地址。如果是web地址则使用内置web-view打开如果是本地页面则跳转本地页面如果是schema地址则打开本地的app",
"label": "点击目标地址", "label": "点击目标地址",
"pattern": "^(http://|https://|/|./|@/)\\S" "pattern": "^(http://|https://|/|./|@/)\\S",
"trim":"both"
}, },
"title": { "title": {
"bsonType": "string", "bsonType": "string",
"description": "标题。为避免背景图和前景文字靠色导致看不清建议使用把标题作为图片的一部分来处理。如可以保证不靠色则可以使用本字段或者额外扩展title_color、title_bgcolor等字段", "description": "标题。为避免背景图和前景文字靠色导致看不清建议使用把标题作为图片的一部分来处理。如可以保证不靠色则可以使用本字段或者额外扩展title_color、title_bgcolor等字段",
"maxLength": 20, "maxLength": 20,
"label": "标题" "label": "标题",
"trim":"both"
}, },
"sort": { "sort": {
"bsonType": "int", "bsonType": "int",
@ -44,7 +47,8 @@
"description": { "description": {
"bsonType": "string", "bsonType": "string",
"description": "维护者自用描述", "description": "维护者自用描述",
"label": "备注" "label": "备注",
"trim":"both"
} }
} }
}, },

View File

@ -16,7 +16,8 @@
"bsonType": "string", "bsonType": "string",
"title": "用户名", "title": "用户名",
"description": "用户名,不允许重复", "description": "用户名,不允许重复",
"order":1 "order":1,
"trim":"both"
}, },
"gender": { "gender": {
"bsonType": "int", "bsonType": "int",
@ -43,20 +44,23 @@
"title": "手机号码", "title": "手机号码",
"order":3, "order":3,
"description": "手机号码", "description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$" "pattern": "^\\+?[0-9-]{3,20}$",
"trim":"both"
}, },
"email": { "email": {
"bsonType": "string", "bsonType": "string",
"format": "email", "format": "email",
"title": "邮箱", "title": "邮箱",
"order":4, "order":4,
"description": "邮箱地址" "description": "邮箱地址",
"trim":"both"
}, },
"comment": { "comment": {
"bsonType": "string", "bsonType": "string",
"title": "备注", "title": "备注",
"order":5, "order":5,
"description": "备注" "description": "备注",
"trim":"both"
} }
} }
}, },

View File

@ -16,7 +16,8 @@
}, },
"content": { "content": {
"bsonType": "string", "bsonType": "string",
"description": "留言内容/回复内容" "description": "留言内容/回复内容",
"trim":"right"
}, },
"imgs": { "imgs": {
"bsonType": "array", "bsonType": "array",
@ -32,11 +33,13 @@
}, },
"contact": { "contact": {
"bsonType": "string", "bsonType": "string",
"description": "联系人" "description": "联系人",
"trim":"both"
}, },
"mobile": { "mobile": {
"bsonType": "string", "bsonType": "string",
"description": "联系电话" "description": "联系电话",
"trim":"both"
}, },
"reply_count": { "reply_count": {
"bsonType": "int", "bsonType": "int",

View File

@ -19,13 +19,15 @@
"name": { "name": {
"bsonType": "string", "bsonType": "string",
"description": "类别名称", "description": "类别名称",
"title":"类别名称" "title":"类别名称",
"trim":"both"
}, },
"icon": { "icon": {
"bsonType": "string", "bsonType": "string",
"description": "类别图标/图片地址", "description": "类别图标/图片地址",
"title":"图标地址", "title":"图标地址",
"pattern": "^(http://|https://|/|./|@/)\\S" "pattern": "^(http://|https://|/|./|@/)\\S",
"trim":"both"
}, },
"sort": { "sort": {
"bsonType": "int", "bsonType": "int",
@ -35,7 +37,8 @@
"description": { "description": {
"bsonType": "string", "bsonType": "string",
"description": "类别描述", "description": "类别描述",
"title":"类别描述" "title":"类别描述",
"trim":"both"
}, },
"is_hot_show": { "is_hot_show": {
"bsonType": "Boolean", "bsonType": "Boolean",

View File

@ -25,7 +25,8 @@
"content": { "content": {
"bsonType": "string", "bsonType": "string",
"description": "评论内容", "description": "评论内容",
"title":"评论内容" "title":"评论内容",
"trim":"both"
}, },
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -20,28 +20,33 @@
"goods_sn": { "goods_sn": {
"bsonType": "string", "bsonType": "string",
"description": "商品的唯一货号", "description": "商品的唯一货号",
"title": "货号" "title": "货号",
"trim":"both"
}, },
"name": { "name": {
"bsonType": "string", "bsonType": "string",
"description": "商品名称", "description": "商品名称",
"title": "名称" "title": "名称",
"trim":"both"
}, },
"keywords": { "keywords": {
"bsonType": "string", "bsonType": "string",
"description": "商品关键字,为搜索引擎收录使用", "description": "商品关键字,为搜索引擎收录使用",
"title": "关键字" "title": "关键字",
"trim":"both"
}, },
"goods_desc": { "goods_desc": {
"bsonType": "string", "bsonType": "string",
"description": "商品详细描述", "description": "商品详细描述",
"title": "详细描述" "title": "详细描述",
"trim":"both"
}, },
"goods_thumb": { "goods_thumb": {
"bsonType": "string", "bsonType": "string",
"description": "商品缩略图,用于在列表或搜索结果中预览显示", "description": "商品缩略图,用于在列表或搜索结果中预览显示",
"title": "缩略图地址", "title": "缩略图地址",
"pattern": "^(http://|https://|/|./|@/)\\S" "pattern": "^(http://|https://|/|./|@/)\\S",
"trim":"both"
}, },
"goods_banner_imgs": { "goods_banner_imgs": {
"bsonType": "array", "bsonType": "array",
@ -108,6 +113,7 @@
"seller_note": { "seller_note": {
"bsonType": "string", "bsonType": "string",
"description": "商家备注,仅商家可见", "description": "商家备注,仅商家可见",
"trim":"both",
"permission": { "permission": {
"read": false "read": false
} }

View File

@ -13,7 +13,8 @@
}, },
"sku_name": { "sku_name": {
"bsonType": "string", "bsonType": "string",
"description": "SKU名称" "description": "SKU名称",
"trim":"both"
}, },
"price": { "price": {
"bsonType": "int", "bsonType": "int",

View File

@ -34,19 +34,22 @@
"bsonType": "string", "bsonType": "string",
"title": "标题", "title": "标题",
"description": "标题", "description": "标题",
"label": "标题" "label": "标题",
"trim":"both"
}, },
"content": { "content": {
"bsonType": "string", "bsonType": "string",
"title": "文章内容", "title": "文章内容",
"description": "文章内容", "description": "文章内容",
"label": "文章内容" "label": "文章内容",
"trim":"right"
}, },
"excerpt": { "excerpt": {
"bsonType": "string", "bsonType": "string",
"title": "文章摘录", "title": "文章摘录",
"description": "文章摘录", "description": "文章摘录",
"label": "摘要" "label": "摘要",
"trim":"both"
}, },
"article_status": { "article_status": {
"bsonType": "int", "bsonType": "int",
@ -125,7 +128,8 @@
"bsonType": "string", "bsonType": "string",
"title": "封面大图", "title": "封面大图",
"description": "缩略图地址", "description": "缩略图地址",
"label": "封面大图" "label": "封面大图",
"trim":"both"
}, },
"publish_date": { "publish_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -15,18 +15,21 @@
"name": { "name": {
"bsonType": "string", "bsonType": "string",
"description": "类别名称", "description": "类别名称",
"label": "名称" "label": "名称",
"trim":"both"
}, },
"description": { "description": {
"bsonType": "string", "bsonType": "string",
"description": "类别描述", "description": "类别描述",
"label": "描述" "label": "描述",
"trim":"both"
}, },
"icon": { "icon": {
"bsonType": "string", "bsonType": "string",
"description": "类别图标地址", "description": "类别图标地址",
"label": "图标地址", "label": "图标地址",
"pattern": "^(http://|https://|/|./|@/)\\S" "pattern": "^(http://|https://|/|./|@/)\\S",
"trim":"both"
}, },
"sort": { "sort": {
"bsonType": "int", "bsonType": "int",

View File

@ -28,7 +28,8 @@
"comment_content": { "comment_content": {
"bsonType": "string", "bsonType": "string",
"description": "评论内容", "description": "评论内容",
"title": "评论内容" "title": "评论内容",
"trim":"right"
}, },
"like_count": { "like_count": {
"bsonType": "int", "bsonType": "int",

View File

@ -13,6 +13,8 @@
"bsonType": "string", "bsonType": "string",
"description": "权限唯一标识,不可修改,不允许重复", "description": "权限唯一标识,不可修改,不允许重复",
"label": "权限标识", "label": "权限标识",
"trim":"both",
"title":"权限ID",
"component": { "component": {
"name": "input" "name": "input"
} }
@ -21,6 +23,8 @@
"bsonType": "string", "bsonType": "string",
"description": "权限名称", "description": "权限名称",
"label": "权限名称", "label": "权限名称",
"title":"权限名称",
"trim":"both",
"component": { "component": {
"name": "input" "name": "input"
} }
@ -29,6 +33,8 @@
"bsonType": "string", "bsonType": "string",
"description": "备注", "description": "备注",
"label": "备注", "label": "备注",
"title":"备注",
"trim":"both",
"component": { "component": {
"name": "textarea" "name": "textarea"
} }

View File

@ -17,12 +17,14 @@
"role_id": { "role_id": {
"title": "唯一ID", "title": "唯一ID",
"bsonType": "string", "bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复" "description": "角色唯一标识,不可修改,不允许重复",
"trim":"both"
}, },
"role_name": { "role_name": {
"title": "名称", "title": "名称",
"bsonType": "string", "bsonType": "string",
"description": "角色名称" "description": "角色名称",
"trim":"both"
}, },
"permission": { "permission": {
"title": "权限", "title": "权限",
@ -33,7 +35,8 @@
"comment": { "comment": {
"title": "备注", "title": "备注",
"bsonType": "string", "bsonType": "string",
"description": "备注" "description": "备注",
"trim":"both"
}, },
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -25,7 +25,8 @@
}, },
"comment": { "comment": {
"bsonType": "string", "bsonType": "string",
"description": "备注,说明积分新增、消费的缘由" "description": "备注,说明积分新增、消费的缘由",
"trim":"both"
}, },
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",

View File

@ -9,12 +9,14 @@
"name": { "name": {
"bsonType": "string", "bsonType": "string",
"description": "任务名称", "description": "任务名称",
"title": "任务名称" "title": "任务名称",
"trim":"both"
}, },
"comment": { "comment": {
"bsonType": "string", "bsonType": "string",
"description": "任务描述", "description": "任务描述",
"title": "任务描述" "title": "任务描述",
"trim":"both"
}, },
"bounty": { "bounty": {
"bsonType": "int", "bsonType": "int",

View File

@ -9,12 +9,14 @@
"username": { "username": {
"bsonType": "string", "bsonType": "string",
"title": "用户名", "title": "用户名",
"description": "用户名,不允许重复" "description": "用户名,不允许重复",
"trim":"both"
}, },
"password": { "password": {
"bsonType": "password", "bsonType": "password",
"title": "密码", "title": "密码",
"description": "密码,加密存储" "description": "密码,加密存储",
"trim":"both"
}, },
"password_secret_version": { "password_secret_version": {
"bsonType": "int", "bsonType": "int",
@ -24,7 +26,8 @@
"nickname": { "nickname": {
"bsonType": "string", "bsonType": "string",
"title": "昵称", "title": "昵称",
"description": "用户昵称" "description": "用户昵称",
"trim":"both"
}, },
"gender": { "gender": {
"bsonType": "int", "bsonType": "int",
@ -65,7 +68,8 @@
"bsonType": "string", "bsonType": "string",
"title": "手机号码", "title": "手机号码",
"description": "手机号码", "description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$" "pattern": "^\\+?[0-9-]{3,20}$",
"trim":"both"
}, },
"mobile_confirmed": { "mobile_confirmed": {
"bsonType": "int", "bsonType": "int",
@ -84,7 +88,8 @@
"bsonType": "string", "bsonType": "string",
"format": "email", "format": "email",
"title": "邮箱", "title": "邮箱",
"description": "邮箱地址" "description": "邮箱地址",
"trim":"both"
}, },
"email_confirmed": { "email_confirmed": {
"bsonType": "int", "bsonType": "int",
@ -102,7 +107,8 @@
"avatar": { "avatar": {
"bsonType": "string", "bsonType": "string",
"title": "头像地址", "title": "头像地址",
"description": "头像地址" "description": "头像地址",
"trim":"both"
}, },
"role": { "role": {
"bsonType": "array", "bsonType": "array",
@ -142,7 +148,8 @@
"comment": { "comment": {
"bsonType": "string", "bsonType": "string",
"title": "备注", "title": "备注",
"description": "备注" "description": "备注",
"trim":"both"
}, },
"realname_auth": { "realname_auth": {
"bsonType": "object", "bsonType": "object",
@ -234,7 +241,8 @@
}, },
"inviter_uid": { "inviter_uid": {
"bsonType": "array", "bsonType": "array",
"description": "用户全部上级邀请者" "description": "用户全部上级邀请者",
"trim":"both"
}, },
"my_invite_code": { "my_invite_code": {
"bsonType": "string", "bsonType": "string",