Database Design
I. Introduction
This document outlines the database design for Qranty, detailing the structure of the primary database and its interactions with other components of the system. By understanding the database schema and relationships, developers can effectively manage data storage, retrieval, and processing within the Qranty application.
II. Database Schema
1. Collections Explaination
Qranty's primary database consists of the following collections:
- Excels Collection: Store the excel file information
- Models Collection: Store the models information
- File Collection: Store the files information
- Companies Collection: Store company information
- User: Store the user information, includes: credentials, role
- Asset: Store the assets information, includes: logo,...
- PrintConfig: Store the print config, includes: max rows excel, max qr per pdf, qr image quality
- RegistrationFailedConfig: Store the config when register failed
- Account: Store the account being used by the company, includes: email, sms, crm
- Template: Store the template message, includes: sms and email for success and failed register
- PrintSample: Store the printing config, includes: qr code position, serial position, model position, in the image
- ActivationField: Store the activation field config.
2. Relationships
The database schema includes the following relationships between collections:
