Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs Data Model #4

Open
pallabez opened this issue Mar 14, 2022 · 0 comments
Open

Logs Data Model #4

pallabez opened this issue Mar 14, 2022 · 0 comments
Assignees

Comments

@pallabez
Copy link
Member

pallabez commented Mar 14, 2022

Log Structure

{
  'type': string,
  'timestamp': timestamp,
  'meta': object,
  'body': object,
}

type - Contains the type of the log
timestamp - Timestamp generated by firestore
meta - Fields that are generally common across different types of logs. Eg - userId, approvedBy, balance etc
body - Fields that are not generic. Eg - profileDiffId, serviceRunnig etc

P. S - It is discussed / given beforehand, which field belongs where.

Profile Diff Approved Logs

Example

{
  "type": "PROFILE_DIFF_APPROVED",
  "timestamp": {
    "_seconds": 1647254438,
    "_nanoseconds": 38000000
  },
  "meta": {
    "userId": "pcBpdEQ5ydRakHHSpY2p",
    "approvedBy": "pcBpdEQ5ydRakHHSpY2p"
  },
  "body": {
    "message": "",
    "profileDiffId": "ueMoEDdbMJhhmFYhCfwN"
  },
}

Structure

{
  type: "PROFILE_DIFF_APPROVED",
  timestamp: <timestamp>,
  meta: {
    approvedBy: <superUserId>,
    userId: <userId>,
  }
  body: {
    profileDiffId: <profileDiffId>,
    message: "reason",
  }
}

For more, refer to - Real-Dev-Squad/identity-service#54

@pallabez pallabez self-assigned this Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant