Versions Compared

Key

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

...

Applicability/configuration of terms and conditions will be based on chosen approach.


Approach

...

We can have Terms & Conditions definition per installation.

In this case a simple table will be created:

...

boolean

true means in force,

false - means past

...

When user updates the terms and conditions

  • a new row will be inserted with content as well as date/user/status
  • old row status will be marked to false.
  • flag in user table for terms & conditions will be marked to false.

Approach 2:

We can create terms & conditions per channel basis.

...

If called without user-token


Approach

...

2:

We can create terms & conditions manually and inserts the version information in system settings.

...

  • We need to create TAC table which will contain column 

    Column NamePurpose
    idPrimary key of the table, auto-generated
    version

    version of TAC

    content
    channelchannel-id
    texthtml content
    created oncreatedOncreated date created by
    createdByuser- who created it
    updatedOnlastUpdatedOnlast updated onupdated by
    lastUpdatedByuser- who updated it


  • 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": {
    "tacVersionversion":"v1", "userId": "userId",
    "status": true } }


     2. Get TAC

        GET /v1/tac/read read

        Response 

        { "response": {
          "text":"html content",

           "version":"v1"   

      }

    }

            For fetching TAC we will get the current version of the TAC from system setting and then fetch the particular TAC from table

...