From 78cc69c123dfe6f276c4811b0d57496078489841 Mon Sep 17 00:00:00 2001 From: chenruilong Date: Tue, 11 Apr 2023 23:04:25 +0800 Subject: [PATCH] update uni cms categories and unlock record tables --- collection/uni-cms-categories/collection.json | 6 ++--- .../uni-cms-unlock-record/collection.json | 24 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/collection/uni-cms-categories/collection.json b/collection/uni-cms-categories/collection.json index e1b42ee..8318228 100644 --- a/collection/uni-cms-categories/collection.json +++ b/collection/uni-cms-categories/collection.json @@ -6,9 +6,9 @@ ], "permission": { "read": true, - "create": false, - "update": false, - "delete": false + "create": true, + "update": true, + "delete": true }, "properties": { "_id": { diff --git a/collection/uni-cms-unlock-record/collection.json b/collection/uni-cms-unlock-record/collection.json index c992504..24bbd7c 100644 --- a/collection/uni-cms-unlock-record/collection.json +++ b/collection/uni-cms-unlock-record/collection.json @@ -7,22 +7,22 @@ "content_id" ], "permission": { - "read": "doc.user_id == auth.uid", - "create": "auth.uid != null", - "update": "doc.user_id == auth.uid", - "delete": "doc.user_id == auth.uid" + "read": true, + "create": true, + "update": false, + "delete": false }, "properties": { "_id": { "description": "存储文档 ID(用户 ID),系统自动生成" }, - "user_id": { + "unique_id": { "bsonType": "string", - "description": "用户ID, 参考`uni-id-users` 表", - "foreignKey": "uni-id-users._id", - "defaultValue": { - "$env": "uid" - } + "description": "用于标识观看广告的唯一标识" + }, + "unique_type": { + "bsonType": "string", + "description": "观看广告的唯一标识类型;user 用户;device 设备" }, "trans_id": { "bsonType": "string", @@ -49,10 +49,10 @@ } }, "index": [{ - "IndexName": "user_article_trans_", + "IndexName": "unique_article_trans_", "MgoKeySchema": { "MgoIndexKeys": [{ - "Name": "user_id", + "Name": "unique_id", "Direction": "1" },{ "Name": "article_id",