Skip to content

Database Schema

Samadhan Salunkhe edited this page Mar 22, 2017 · 16 revisions

The Terms & Conditions Manager uses the following tables.

#__tc_content

This table is used for storing the Terms & Conditions with the combination of unique 'version no' & 'client(Ex. com_tjlms,com_subusers)'. 'Content' field stores all T & C in text format. The 'global' field is used for showing T & C for all pages. The 'groups' field stores selected user types for accepting T & C.

Column Name Data Type Comment
tc_id INT Primary Key
title VARCHAR
version INT Version number for the T&C
client VARCHAR The client (purpose) of the T&C. Use this to create different T&C that a user can accept. The combination of client and version is unique.
content VARCHAR The content of the T&C
start_date DATE Applicable from
global INT
groups VARCHAR
is_blacklist INT
enforce_delay_days INT
created_on DATETIME
modified_on DATETIME
created_by INT id of user who created the T&C
modified_by INT id of user who modified the T&C

Keys

Name Type Fields
tc_id PRIMARY tc_id
client_version UNIQUE client, version

#__tc_patterns

This table is used for storing client, option, view & params of URL

Column Name Data Type
tc_id INT
client VARCHAR
option VARCHAR
view VARCHAR
params VARCHAR

#__tc_acceptance

This table stores the accepted users T & C entries.

Column Name Data Type
user_id INT
tc_id INT
client VARCHAR
accepted_on DATE
params VARCHAR

Keys

Name Type Fields
user_tc UNIQUE user_id, tc_id
Clone this wiki locally