Verano Regional uses a MySQL (or MariaDB-compatible) relational schema namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AngelZurita28/VeranoRegional/llms.txt
Use this file to discover all available pages before exploring further.
verano. The schema is shipped as schema.sql in the repository root and uses utf8mb4 collation throughout to support full Unicode. All tables follow a consistent soft-delete convention: a status tinyint column where 0 means inactive and 1 means active. Audit columns (createDate, updateDate, idUserCreate, idUserUpdate) appear on most entities.
Tables
user — core user table
user — core user table
student, researcher, or coordinator).| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
idUserType | int | FK → usertype.id |
email | varchar(100) | Login credential |
password | varchar(255) | bcrypt hash |
name | varchar(255) | Given name |
paternalLastName | varchar(50) | |
maternalLastName | varchar(50) | |
birthDate | date | |
genre | varchar(20) | masculino, femenino, otro |
phone | varchar(20) | |
street, zone, number, zipCode | varchar | Address fields |
idCampus | int | FK → campus.id |
isValid | tinyint(1) | 0 = pending validation, 1 = validated |
idUserValidate | int | FK → user.id (coordinator who validated) |
validateDate | datetime | |
status | tinyint | 0 inactive / 1 active |
usertype — role definitions
usertype — role definitions
id value is used throughout controllers in requireRole() calls.| id | Description |
|---|---|
| 1 | Admin (super-admin) |
| 2 | Institutional coordinator |
| 3 | Campus coordinator |
| 4 | Researcher |
| 5 | Student |
student — student-specific fields
student — student-specific fields
user for students. One row per student per summer program period.| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
code | varchar(20) | Student ID number |
CURP | varchar(18) | Mexican personal ID code |
semester | int | Current semester |
noteAverage | decimal(4,2) | Grade average, base 100 |
careerProgressPercentage | int | Must be ≥ the summer program minimum |
idCareer | int | FK → career.id |
idResearcherRecommends | int | FK → researcher.id (nullable) |
idUser | int | FK → user.id |
idSummer | int | FK → summer.id |
researcher — researcher-specific fields
researcher — researcher-specific fields
user for researchers. SNI and PRODEP are national research recognition flags.| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
title | varchar(50) | Academic title (e.g., Dr., M.C.) |
department | varchar(100) | Department or lab name |
SNILevel | tinyint | 0=No SNI, 1=I, 2=II, 3=III |
PRODEP | tinyint | 0=No, 1=Yes |
idUser | int | FK → user.id (unique) |
coordinator — coordinator-specific fields
coordinator — coordinator-specific fields
user for both campus and institutional coordinators.| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
position | varchar(50) | Job title or position |
itsInstitutionalCoordinator | tinyint(1) | 1 = institutional, 0 = campus |
idUser | int | FK → user.id (unique) |
project — research projects
project — research projects
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
title | varchar(255) | Project title |
profile | text | Desired student profile |
activity | text | Description of activities |
skills | text | Required skills |
modality | text | In-person, remote, etc. |
observations | text | Additional notes |
studentAmount | int | Max students accepted |
careerProgressPercentage | int | Minimum career progress required |
isValid | tinyint(1) | 0 = pending, 1 = validated by coordinator |
idUserResearcher | int | FK → user.id (nullable) |
idCampus | int | FK → campus.id |
idInstitution | int | FK → institution.id |
idSummer | int | FK → summer.id |
idArea | int | FK → area.id |
career | varchar(255) | Target career (free text) |
image | text | Optional image path |
application — student applications
application — student applications
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
idProject | int | FK → project.id |
idUserStudent | int | FK → user.id |
idSummer | int | FK → summer.id |
priority | tinyint | Application rank (1 = top choice) |
isAccepted | tinyint(1) | 1 after allocation algorithm runs |
comment | text | Optional student comment |
lapNumber | int | Program lap, ≥ 1 |
status | tinyint | 0 inactive / 1 active |
(idProject, idUserStudent, priority) prevents duplicate priority assignments.summer — program period configuration
summer — program period configuration
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
description | varchar(300) | e.g., “Verano 2026” |
summerStartDate / summerEndDate | datetime | Overall program dates |
startDate / endDate | datetime | Registration window |
startValidateResearcherDate / endValidateResearcherDate | datetime | Researcher validation window |
startCreateApplicationDate / endCreateApplicationDate | datetime | Student application window |
startValidateApplicationDate / endValidateApplicationDate | datetime | Coordinator validation window |
startCreateReportDate / endCreateReportDate | datetime | Report submission window |
startValidateReportDate / endValidateReportDate | datetime | Report validation window |
studentApplication | int | Max applications per student |
studentPerProject | int | Max students per project |
studentProgressMinPercentage | int | Minimum career progress to apply |
campus — campus records
campus — campus records
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
description | varchar(100) | Campus name |
campusAbbreviation | varchar(20) | Short code |
idInstitution | int | FK → institution.id |
idCity | int | FK → city.id |
institution — institution records
institution — institution records
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
description | varchar(255) | Full institution name (unique) |
abbreviation | varchar(20) | Short name |
idState | int | FK → state.id |
institutional_email | varchar(255) | Official contact email |
domain | varchar(255) | Email domain for OTP validation |
career — academic careers
career — academic careers
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
description | varchar(100) | Career name |
idCampus | int | FK → campus.id |
area — research areas
area — research areas
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
description | varchar(300) | Area name |
report — student progress reports
report — student progress reports
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
idUser | int | FK → user.id (student) |
idProject | int | FK → project.id |
updateDate | datetime | Last upload timestamp |
status | tinyint(1) | Validation status |
document and studentdocument — document templates and uploads
document and studentdocument — document templates and uploads
document defines required document types (e.g., CURP, KARDEX) identified by a unique prefix. studentdocument records which documents a student has uploaded; the uploaded file is stored on disk under uploads/student_documents/{studentId}/{prefix}.pdf.A unique index on (idDocument, idStudent) in studentdocument ensures one upload per document type per student.verified_emails — OTP verification records
verified_emails — OTP verification records
is_used flag is set to 1 after the student completes registration.| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
email | varchar(100) | Unique — one active OTP per address |
otp_hash | varchar(255) | bcrypt hash of the OTP |
expires_at | datetime | Expiry timestamp |
is_used | tinyint(1) | 1 after successful verification |
passwordresets — password reset OTP records
passwordresets — password reset OTP records
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
email | varchar(100) | Target address (indexed) |
otp_hash | varchar(255) | bcrypt hash of the OTP |
expires_at | datetime | Expiry timestamp |
approved_registrations — pre-approved registration keys
approved_registrations — pre-approved registration keys
| Column | Type | Notes |
|---|---|---|
id | int | Primary key |
registration_key | varchar(50) | Unique key (e.g., institutional ID) |
id_user_type | int | FK → usertype.id — role this key grants |
Database views
The schema ships eight pre-built views that join the normalised tables into flat, query-friendly result sets. Controllers and models read from these views instead of writing multi-table joins inline.| View | Description |
|---|---|
vw_projectdetails | Projects joined with researcher name and title, area, campus, and institution |
vw_studentdetails | Students joined with career, campus, and institution |
vw_researcherdetails | Researchers joined with campus and institution |
vw_coordinatordetails | Coordinators joined with campus and institution; includes coordinatorType label |
vw_projectapplications | Applications joined with vw_studentdetails — used by researchers to see who applied |
vw_studentapplications | Applications joined with vw_projectdetails — used by students to see their applications |
vw_campusdetails | Campus joined with institution name and a city - state location string |
vw_careerdetails | Careers joined with campus and institution |
Key relationships
status column follows a consistent convention across all tables: 0 = inactive (soft-deleted), 1 = active. Queries should always filter on status = 1 unless you intentionally need to retrieve inactive records.