初始化
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
module.exports = {
|
||||
doc: "消息表",
|
||||
api: true,//是否需要生成api接口
|
||||
doc : "消息表",
|
||||
api : true,//是否需要生成api接口
|
||||
model: {
|
||||
uid: {type: "STRING", comment: '发送人用户id'},
|
||||
name: {type: "STRING", comment: '发送人名称'},
|
||||
avatar: {type: "STRING", comment: '发送人头像'},
|
||||
to_uid: {type: "STRING", comment: '接收人用户id'},
|
||||
to_name: {type: "STRING", comment: '接收人名称'},
|
||||
oid : {type: "INTEGER", comment: '发送人用户机构id'},
|
||||
uid : {type: "INTEGER", comment: '发送人用户id'},
|
||||
name : {type: "STRING", comment: '发送人名称'},
|
||||
avatar : {type: "STRING", comment: '发送人头像'},
|
||||
to_uid : {type: "STRING", comment: '接收人用户id'},
|
||||
to_name : {type: "STRING", comment: '接收人名称'},
|
||||
to_avatar: {type: "STRING", comment: '接收人头像'},
|
||||
status: {type: "STRING", comment: '状态:已读/未读:y/n'},
|
||||
type: {type: "STRING", comment: '消息类型:file / image / text / event'},
|
||||
sendTime: {type: "STRING", comment: '消息发送时间'},
|
||||
content: {type: "STRING", comment: '消息内容,如果type=file,此属性表示文件的URL地址'},
|
||||
fileSize: {type: "STRING", comment: '文件大小'},
|
||||
fileName: {type: "STRING", comment: '文件名称'},
|
||||
status : {type: "STRING", comment: '状态:已读/未读:y/n'},
|
||||
type : {type: "STRING", comment: '消息类型:file / image / text / event'},
|
||||
sendTime : {type: "STRING", comment: '消息发送时间'},
|
||||
content : {type: "STRING", fieldNameCus: '消息内容', comment: '消息内容,如果type=file,此属性表示文件的URL地址'},
|
||||
fileSize : {type: "STRING", comment: '文件大小'},
|
||||
fileName : {type: "STRING", comment: '文件名称'},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,39 +1,6 @@
|
||||
module.exports = {
|
||||
describe_name: "permission/权限管理",
|
||||
describe_name: "message/消息中心",
|
||||
testList : [
|
||||
{
|
||||
test_name: "账号密码注册",
|
||||
fun : async (request, server) => {
|
||||
const response = await request(server)
|
||||
.post('/permission/api/registered')
|
||||
.send({
|
||||
type: "accountPassword",
|
||||
data: {
|
||||
account : "test",
|
||||
password: "123456",
|
||||
},
|
||||
})
|
||||
// expect(response.status).toEqual(200)
|
||||
expect(response.body.status).toEqual(200)
|
||||
expect(response.body.data).toHaveProperty('token')
|
||||
}
|
||||
},
|
||||
{
|
||||
test_name: "账号密码登录",
|
||||
fun : async (request, server) => {
|
||||
const response = await request(server)
|
||||
.post('/permission/api/login')
|
||||
.send({
|
||||
type: "accountPassword",
|
||||
data: {
|
||||
account : "test",
|
||||
password: "123456",
|
||||
},
|
||||
})
|
||||
// expect(response.status).toEqual(200)
|
||||
expect(response.body.status).toEqual(200)
|
||||
expect(response.body.data).toHaveProperty('token')
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user