uni-im-group-member.schema.json 1.2 KB
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
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 49 50
// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema
{
	"bsonType": "object",
  "description": "im群成员表",
	"required": [],
	"permission": {
		"read":  true, //由触发器再次管理
		"create": false,
		"update": true,//由触发器再次管理
		"delete": true //由触发器再次管理
	},
	"properties": {
		"_id": {
			"description": "ID,系统自动生成"
		},
		"group_id":{
			"bsonType": "string",
			"description": "群id",
			"foreignKey": "uni-im-group._id"
		},
		"user_id":{
			"bsonType": "string",
			"description": "用户id",
			"foreignKey": "uni-id-users._id"
		},
		"role":{
			"bsonType": "array",
			"enum":[
				{
					"text":"创建者",
					"value":"creator"
				},
				{
					"text":"管理员",
					"value":"admin"
				}
			],
      "defaultValue":[]
		},
    "mute_type":{
      "bsonType": "int",
      "description": "0-正常,1-被单独禁言或被全群禁言 2-被单独禁言且被全群禁言",
      "defaultValue":0
    },
		"create_time": {
			"bsonType": "timestamp",
			"description": "入群时间",
			"forceDefaultValue": {
				"$env": "now"
			}
51 52 53 54 55
		},
    "active_time": {
      "bsonType": "timestamp",
      "description": "活跃时间(最后一场发消息时间)"
    }
DCloud_JSON's avatar
DCloud_JSON 已提交
56 57
	}
}