opendb-sign-in.schema.json 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema
  2. {
  3. "bsonType": "object",
  4. "required": [],
  5. "permission": {
  6. "read": "auth.uid == doc.user_id",
  7. "create": "auth.uid != null && 'signIn' in action", //如果你要使用`看广告签到`的方式请将这里的值改为:false
  8. "update": false,
  9. "delete": false
  10. },
  11. "properties": {
  12. "_id": {
  13. "description": "ID,系统自动生成"
  14. },
  15. "user_id":{
  16. "forceDefaultValue":{
  17. "$env":"uid"
  18. }
  19. },
  20. "date":{
  21. "bsonType":"timestamp",
  22. "description":"签到的日期时间戳",
  23. "permission":{
  24. "write":false
  25. }
  26. },
  27. "create_date":{
  28. "bsonType":"timestamp",
  29. "description":"签到的时间戳",
  30. "forceDefaultValue":{
  31. "$env":"now"
  32. }
  33. },
  34. "ip":{
  35. "bsonType":"string",
  36. "forceDefaultValue":{
  37. "$env":"clientIP"
  38. }
  39. }
  40. }
  41. }