uni-id-log.schema.json 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. "bsonType": "object",
  3. "required": ["user_id"],
  4. "permission": {
  5. "read": "'READ_UNI_ID_LOG' in auth.permission"
  6. },
  7. "properties": {
  8. "_id": {
  9. "description": "ID,系统自动生成"
  10. },
  11. "create_date": {
  12. "bsonType": "timestamp",
  13. "description": "创建时间",
  14. "forceDefaultValue": {
  15. "$env": "now"
  16. }
  17. },
  18. "device_uuid": {
  19. "bsonType": "string",
  20. "description": "设备唯一标识"
  21. },
  22. "ip": {
  23. "bsonType": "string",
  24. "description": "ip地址"
  25. },
  26. "state": {
  27. "bsonType": "int",
  28. "description": "结果:0 失败、1 成功"
  29. },
  30. "type": {
  31. "bsonType": "string",
  32. "description": "操作类型",
  33. "enum": [
  34. "logout",
  35. "login",
  36. "register",
  37. "reset-pwd",
  38. "bind-mobile",
  39. "bind-weixin",
  40. "bind-qq",
  41. "bind-apple",
  42. "bind-alipay"
  43. ]
  44. },
  45. "ua": {
  46. "bsonType": "string",
  47. "description": "userAgent"
  48. },
  49. "user_id": {
  50. "bsonType": "string",
  51. "foreignKey": "uni-id-users._id",
  52. "description": "用户id,参考uni-id-users表"
  53. },
  54. "username": {
  55. "bsonType": "string",
  56. "description": "用户名"
  57. },
  58. "email": {
  59. "bsonType": "string",
  60. "description": "邮箱"
  61. },
  62. "mobile": {
  63. "bsonType": "string",
  64. "description": "手机号"
  65. },
  66. "appid": {
  67. "bsonType": "string",
  68. "description": "客户端DCloud AppId"
  69. }
  70. }
  71. }