Open thinkiqbs opened 1 year ago
The schema will look something like this
id: a unique identifier for each case created_at: the date and time the case was created modified_at: the date and time the case was last modified location: the location associated with the case status: the current status of the case (e.g. "open," "closed," "pending") outcome: the outcome of the case (e.g. "won," "lost," "settled") personnel: an array of personnel attached to the case, including their name and role notes: an array of notes associated with the case system_state: the current state of the case in the system access_control: an array of user roles that have access to the case
Here is the SQL Script
CREATE TABLE cases ( id INT AUTO_INCREMENT PRIMARY KEY, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, modified_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, location VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, outcome VARCHAR(255) NOT NULL, personnel JSON NOT NULL, notes JSON NOT NULL, system_state VARCHAR(255) NOT NULL, access_control JSON NOT NULL );