uni-id-roles.schema.json 942 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
{
	"bsonType": "object",
	"permission": {
		"create": false,
		"delete": false,
		"read": false,
		"update": false
	},
	"properties": {
		"_id": {
			"description": "存储文档 ID,系统自动生成"
		},
		"comment": {
			"bsonType": "string",
			"description": "备注",
			"title": "备注",
			"trim": "both"
		},
		"create_date": {
			"bsonType": "timestamp",
			"description": "创建时间",
			"forceDefaultValue": {
				"$env": "now"
			}
		},
		"permission": {
			"bsonType": "array",
			"description": "角色拥有的权限列表",
			"foreignKey": "uni-id-permissions.permission_id",
			"title": "权限"
		},
		"role_id": {
			"bsonType": "string",
			"description": "角色唯一标识,不可修改,不允许重复",
			"title": "唯一ID",
			"trim": "both"
		},
		"role_name": {
			"bsonType": "string",
			"description": "角色名称",
			"title": "名称",
			"trim": "both"
		}
	},
	"required": [
		"role_id"
	]
}