Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this case a simple table will be created:

Column NamePurpose
tacIdPrimary key of the table, auto-generated
tacStatus

boolean

true means in force,

false - means past

tacContenthtml content
tacUpdatedDatedatetime - when terms and condition was last updated
tacUpdatedByuser- who updated it for last time


When user updates the terms and conditions

...

  • We need to create TAC table which will contain column →  id→  id, version, content, created on, created by, updated on, updated by
  • We need system setting  which contains the latest version id of TAC
  • We need to add ( tacStatus, tacAcceptedDate, tacVersionId) columns in user table and we can drop (tcstatus,    tcupdateddate) as we are not using them 

...

  1. Accept TAC  
    POST /v1/tac/accepts/
    {
      "request": {
    "tacVersion":"v1", "userId": "userId",
    "status": true } }


     2. Get TacPOSTTAC

        GET /v1/tac/read 

Response

200 OK - Terms updated successfully

400 Bad Request - Request validation - invalid userId or invalid tacVersion