提交 827afca9 编写于 作者: DCloud_JSON's avatar DCloud_JSON

新增uni-id-roles.schema

上级 f1095194
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
"properties": { "properties": {
"_id": { "_id": {
"description": "ID,系统自动生成" "description": "ID,系统自动生成"
}, },
"article_id": { "article_id": {
"bsonType": "string", "bsonType": "string",
"description": "文章id,参考opendb-news-articles表", "description": "文章id,参考opendb-news-articles表",
"foreignKey": "opendb-news-articles._id" "foreignKey": "opendb-news-articles._id"
}, },
"article_title":{ "article_title": {
"bsonType": "string", "bsonType": "string",
"description": "文章标题" "description": "文章标题"
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
}, },
"update_date": { "update_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "更新/修改时间", "description": "更新\/修改时间",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "now" "$env": "now"
} }
......
{
"bsonType": "object",
"required": ["permission_id", "permission_name"],
"properties": {
"_id": {
"description": "存储文档 ID,系统自动生成"
},
"permission_id": {
"bsonType": "string",
"description": "权限唯一标识,不可修改,不允许重复",
"label": "权限标识",
"trim": "both",
"title": "权限ID",
"component": {
"name": "input"
}
},
"permission_name": {
"bsonType": "string",
"description": "权限名称",
"label": "权限名称",
"title": "权限名称",
"trim": "both",
"component": {
"name": "input"
}
},
"comment": {
"bsonType": "string",
"description": "备注",
"label": "备注",
"title": "备注",
"trim": "both",
"component": {
"name": "textarea"
}
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
}
{
"bsonType": "object",
"required": ["role_id"],
"permission": {
"read": false,
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "存储文档 ID,系统自动生成"
},
"role_id": {
"title": "唯一ID",
"bsonType": "string",
"description": "角色唯一标识,不可修改,不允许重复",
"trim": "both"
},
"role_name": {
"title": "名称",
"bsonType": "string",
"description": "角色名称",
"trim": "both"
},
"permission": {
"title": "权限",
"bsonType": "array",
"foreignKey": "uni-id-permissions.permission_id",
"description": "角色拥有的权限列表"
},
"comment": {
"title": "备注",
"bsonType": "string",
"description": "备注",
"trim": "both"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
}
...@@ -41,4 +41,4 @@ ...@@ -41,4 +41,4 @@
} }
} }
} }
} }
{ {
"bsonType": "object", "bsonType": "object",
"required": [ "required": ["content"],
"content"
],
"permission": { "permission": {
"create": "auth.uid != null", "create": "auth.uid != null",
"read": true, "read": true,
...@@ -15,7 +13,7 @@ ...@@ -15,7 +13,7 @@
}, },
"user_id": { "user_id": {
"bsonType": "string", "bsonType": "string",
"description": "留言反馈用户ID/回复留言用户ID,参考uni-id-users表", "description": "留言反馈用户ID\/回复留言用户ID,参考uni-id-users表",
"foreignKey": "uni-id-users._id", "foreignKey": "uni-id-users._id",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "uid" "$env": "uid"
...@@ -23,14 +21,14 @@ ...@@ -23,14 +21,14 @@
}, },
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"title": "留言时间/回复留言时间", "title": "留言时间\/回复留言时间",
"forceDefaultValue": { "forceDefaultValue": {
"$env": "now" "$env": "now"
} }
}, },
"content": { "content": {
"bsonType": "string", "bsonType": "string",
"title": "留言内容/回复内容", "title": "留言内容\/回复内容",
"componentForEdit": { "componentForEdit": {
"name": "textarea" "name": "textarea"
}, },
...@@ -71,4 +69,4 @@ ...@@ -71,4 +69,4 @@
"defaultValue": 0 "defaultValue": 0
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册