移动app
This commit is contained in:
14
uni-im示例/uniCloud-aliyun/database/JQL查询.jql
Normal file
14
uni-im示例/uniCloud-aliyun/database/JQL查询.jql
Normal file
@@ -0,0 +1,14 @@
|
||||
// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理
|
||||
// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
|
||||
// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
|
||||
// 如果文档中存在多条JQL语句,只有最后一条语句生效
|
||||
// 如果混写了普通js,最后一条语句需是数据库操作语句
|
||||
// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission
|
||||
// 不支持clientDB的action
|
||||
// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
|
||||
// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html
|
||||
|
||||
// 下面示例查询uni-id-users表的所有数据
|
||||
db.collection('uni-im-msg').update({
|
||||
is_read:true
|
||||
});
|
||||
9
uni-im示例/uniCloud-aliyun/database/db_init.json
Normal file
9
uni-im示例/uniCloud-aliyun/database/db_init.json
Normal file
@@ -0,0 +1,9 @@
|
||||
// 在本文件中可配置云数据库初始化,数据格式见:https://uniapp.dcloud.io/uniCloud/hellodb?id=db-init
|
||||
// 编写完毕后对本文件点右键,可按配置规则创建表和添加数据
|
||||
{
|
||||
"opendb-tempdata": {},
|
||||
"opendb-department": {},
|
||||
"uni-id-users": {
|
||||
"data": []
|
||||
}
|
||||
}
|
||||
12
uni-im示例/uniCloud-aliyun/database/default.jql
Normal file
12
uni-im示例/uniCloud-aliyun/database/default.jql
Normal file
@@ -0,0 +1,12 @@
|
||||
// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理
|
||||
// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法
|
||||
// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码
|
||||
// 如果文档中存在多条JQL语句,只有最后一条语句生效
|
||||
// 如果混写了普通js,最后一条语句需是数据库操作语句
|
||||
// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission
|
||||
// 不支持clientDB的action
|
||||
// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit
|
||||
// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html
|
||||
|
||||
// 下面示例查询uni-id-users表的所有数据
|
||||
db.collection('uni-id-users').get();
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"bsonType": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"permission": {
|
||||
"read": true,
|
||||
"create": false,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"parent_id": {
|
||||
"bsonType": "string",
|
||||
"description": "父级部门ID",
|
||||
"parentKey": "_id"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": "string",
|
||||
"description": "部门名称",
|
||||
"title": "部门名称",
|
||||
"trim": "both"
|
||||
},
|
||||
"level": {
|
||||
"bsonType": "int",
|
||||
"description": "部门层级,为提升检索效率而作的冗余设计"
|
||||
},
|
||||
"sort": {
|
||||
"bsonType": "int",
|
||||
"description": "部门在当前层级下的顺序,由小到大",
|
||||
"title": "显示顺序"
|
||||
},
|
||||
"manager_uid": {
|
||||
"bsonType": "string",
|
||||
"description": "部门主管的userid, 参考`uni-id-users` 表",
|
||||
"foreignKey": "uni-id-users._id"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "部门创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user