...
In this case a simple table will be created:
Column Name | Purpose |
---|---|
tacId | Primary key of the table, auto-generated |
tacStatus | boolean true means in force, false - means past |
tacContent | html content |
tacUpdatedDate | datetime - when terms and condition was last updated |
tacUpdatedBy | user- 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
...
- 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