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": {
"bsonType": "string",
"description": "菜单项的ID不可重复"
"description": "菜单项的ID不可重复",
"trim":"both"
},
"name": {
"bsonType": "string",
"description": "菜单名称"
"description": "菜单名称",
"trim":"both"
},
"icon": {
"bsonType": "string",
"description": "菜单图标"
"description": "菜单图标",
"trim":"both"
},
"url": {
"bsonType": "string",
"description": "菜单url"
"description": "菜单url",
"trim":"both"
},
"sort": {
"bsonType": "int",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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