Skip to main content

1. Core & Institutional Identity

These tables define the school entities, administrative users, and the initial registration lifecycle.

schools

Stores the metadata for each school instance.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementInternal database ID.
skole_idVarChar(15)Unique, Not NullPublicly visible school identifier.
user_idIntFK (users)Owner/Primary Admin of the school.
school_nameVarChar(255)Not NullOfficial institution name.
emailStringNullablePrimary school contact email.
phone_noStringNullablePrimary contact number.
address_1VarChar(255)Not NullPrimary address line.
address_2VarChar(255)NullableSecondary address line.
cityVarChar(150)Not NullRegistered city.
stateVarChar(100)Not NullRegistered state.
pincodeIntNot NullArea pin code.
countryStringNullableCountry name.
is_activeSmallIntDefault 1Status flag (1: Active, 0: Inactive).

users

Global administrative users responsible for managing the platform.
ColumnTypeConstraintsDescription
idBigIntPK, AutoIncrementUnique admin identifier.
nameVarChar(191)Not NullAdmin’s full name.
emailVarChar(191)UniqueLogin credential email.
phoneBigIntNot NullContact phone number.
passwordVarChar(191)Not NullHashed password (Bcrypt).
designationVarChar(150)NullableAdmin role/title.
privilegeVarChar(50)NullableAccess level.
profile_photo_pathVarChar(2048)NullablePath to profile image.

registrations

Tracks new school registration requests from the public landing page.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementRegistration ID.
full_nameVarChar(255)Not NullRegistrant’s full name.
emailVarChar(255)Not NullRegistrant’s email.
mobile_noDecimal(10,0)Not NullContact mobile.
school_nameVarChar(255)Not NullRequested school name.
school_addressVarChar(255)Not NullPhysical location.
children_enrolledVarChar(255)Not NullExpected scale.
registrant_roleVarChar(255)Not NullRelationship to school.
school_typeVarChar(255)Not NullPrimary/Secondary/etc.
is_convertedSmallIntDefault 01 if registration turned into a full school instance.

2. Staff & Resource Management

Manages school employees, their roles (RBAC), and their assignments to students.

staff

Primary registry for teachers and school staff.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementUnique staff ID.
skole_idVarChar(15)FKMulti-tenant link.
nameVarChar(100)NullableStaff member name.
designationVarChar(100)NullableJob title.
phone_noVarChar(50)UniqueLogin credential (Phone).
emailVarChar(255)NullableContact email.
pinIntNullable4-digit mobile app PIN.
rbacJsonNullableFine-grained permission definitions.
statusIntDefault 01: Active, 0: Suspended.

staff_student

Mapping table that assigns students to specific teachers.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementMapping ID.
skole_idVarChar(15)FKMulti-tenant link.
staff_idIntFK (staff)The assigned teacher.
student_idIntFK (students)The assigned student.

staff_address

Stores residential information for staff members.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementAddress ID.
skole_idVarChar(15)FKMulti-tenant link.
staff_idIntFK (staff)Linked staff member.
address_typeVarChar(100)Nullablee.g. ‘local’, ‘permanent’
addressVarChar(255)NullableStreet address.
cityVarChar(255)NullableCity name.
stateVarChar(255)NullableState name.
pincodeIntNullableArea pin code.

staff_designation

Pre-defined job roles with template RBAC permissions.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementDesignation ID.
skole_idVarChar(15)FKMulti-tenant link.
designationVarChar(100)Not NullRole name.
rbacJsonNot NullAssociated permissions.

staff_leave

Leave applications and approval status for school employees.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementLeave ID.
skole_idVarChar(15)FKMulti-tenant link.
staff_idIntFK (staff)Applying staff member.
leave_date_fromDateNullableStart date.
leave_date_toDateNullableEnd date.
leave_reasonVarChar(255)NullableJustification.
leave_statusVarChar(50)Nullablee.g., ‘Pending’, ‘Approved’.

3. Student & Parent Ecosystem

The core registry relating students, their guardians, addresses, and parent authentication.

students

The central model for all student-related data.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementUnique student ID.
skole_idVarChar(15)FKMulti-tenant link.
roll_noVarChar(50)NullableSchool-assigned roll number.
student_full_nameVarChar(255)NullableFull legal name.
date_of_birthDateNullableBirthday.
genderVarChar(45)NullableM/F/Other.
gradeVarChar(100)NullableCurrent class (e.g., Grade 5-A).
blood_groupVarChar(45)NullableCritical medical info.
student_statusVarChar(50)Nullableactive, archived, relieved.

student_address

Physical address tracking for students (Permanent/Current).
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementAddress ID.
skole_idVarChar(15)FKMulti-tenant link.
student_roll_noVarChar(100)NullableLinked roll number.
address_typeVarChar(100)Nullablee.g., ‘permanent’, ‘current’.
addressVarChar(255)NullableFull address.
cityVarChar(255)NullableCity.
stateVarChar(255)NullableState.
pincodeIntNullableZIP code.

student_guardian

Auxiliary guardian information (Alternative contacts).
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementGuardian ID.
skole_idVarChar(15)FKMulti-tenant link.
student_roll_noVarChar(255)NullableLinked student.
guardian_nameVarChar(255)NullableName of guardian.
relationshipVarChar(150)Not Nulle.g., ‘Father’, ‘Mother’, ‘Aunt’.
addressVarChar(255)NullableGuardian’s address.
phone_noDecimal(10,0)NullableContact number.
alternate_phone_noDecimal(10,0)NullableSecondary contact.

parent_details

Authentication and profile data for parents.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementPrimary ID.
skole_idVarChar(15)FKMulti-tenant link.
student_roll_noVarChar(255)NullableLinked roll number.
father_nameVarChar(255)NullableFather’s name.
mother_nameVarChar(255)NullableMother’s name.
father_phone_noDecimal(10,0)NullableLogin credential (Primary).
mother_phone_noDecimal(10,0)NullableSecondary contact.
pinIntNullableParent app access PIN.
fcm_tokenVarChar(255)NullableLatest push token for quick lookup.

4. Academic & Daily Operations

Tracks the daily flow of school life: attendance, food, calendar, and notices.

academic_events

School calendar events, holidays, and exams.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementEvent ID.
skole_idVarChar(15)FKMulti-tenant link.
titleVarChar(100)NullableEvent title.
descriptionVarChar(255)NullableEvent summary.
event_typeVarChar(50)Nullablee.g., ‘holiday’, ‘exam’.
event_from_dateDateNullableStart date.
event_to_dateDateNullableEnd date.

student_attendance

Daily presence tracking.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementAttendance record ID.
skole_idVarChar(15)FKMulti-tenant link.
student_idIntFK (students)Targeted student.
dateDateNullableAttendance date.
checkedIn_atTimestampNullableTime of arrival.
CheckedOut_atTimestampNullableTime of departure.
attendance_statusVarChar(20)EnumPresent, Absent, Late.
availability_statusVarChar(100)EnumIN, OUT (Premises status).

noticeboards

Official announcements broadcasted to the school or specific segments.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementNotice ID.
skole_idVarChar(15)FKMulti-tenant link.
notice_titleVarChar(255)NullableHeading.
notice_descVarChar(255)NullableContent summary.
notice_typeVarChar(255)Nullablee.g., ‘urgent’, ‘general’.

food_menus

Defines available food items and nutritional information.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementMenu ID.
skole_idVarChar(15)FKMulti-tenant link.
food_menu_titleVarChar(255)NullableMenu name.
food_menu_itemsVarChar(255)NullableList of items.
menu_nutrientsVarChar(255)NullableHealthy info.
statusVarChar(25)Nullableactive/inactive.

food_menu_schedule

Scheduling for menus (which menu on which day).
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementSchedule ID.
skole_idVarChar(15)FKMulti-tenant link.
food_menu_idIntFK (food_menus)Linked menu.
menu_dayVarChar(255)NullableWeekday.
menu_periodVarChar(255)NullableBreakfast/Lunch/etc.

5. Communication & Engagement

Interactive modules for homework, activities, and ticketing.

digital_diary

Assignments and logs posted to specific grades or students.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementEntry ID.
skole_idVarChar(15)FKMulti-tenant link.
staff_idIntFK (staff)Authoring teacher.
gradeVarChar(50)NullableTargeted class.
diary_typeVarChar(50)Nullablee.g., ‘homework’, ‘notice’.
titleVarChar(255)NullableHeading.
descriptionTextNullableFull details.
due_dateDateNullableSubmission deadline.
attachment_urlVarChar(500)NullableLinked file.
statusVarChar(25)Nullableactive/inactive.

activities

Visual logs of student participation and extracurricular updates.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementActivity ID.
skole_idVarChar(15)FKMulti-tenant link.
titleVarChar(255)NullableActivity name.
descriptionTextNullableDetails.
activity_typeVarChar(50)Nullablee.g., ‘sports’, ‘arts’.
posted_byVarChar(50)NullableAuthor role.
posted_by_idIntNullableAuthor ID.

write_to

Direct communication/ticketing from parents to staff.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementTicket ID.
skole_idVarChar(15)FKMulti-tenant link.
parent_idIntFK (parents)Initiating parent.
student_idIntFK (students)Subject student.
request_typeVarChar(50)Nullablee.g. ‘Leave’, ‘Query’
subjectVarChar(255)NullableSummary.
messageTextNullableFull message.
statusVarChar(25)NullableOpen/Resolved/etc.
priorityVarChar(25)Nullableurgent/normal.

write_to_replies

Messages in a ticket conversation threads.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementReply ID.
skole_idVarChar(15)FKMulti-tenant link.
write_to_idIntFK (write_to)Parent ticket.
replied_byVarChar(50)Nullablestaff/parent.
messageTextNullableReply content.
is_readSmallIntDefault 0Read status.

comments

Social layer for comments on diary, activities, etc.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementComment ID.
skole_idVarChar(15)FKMulti-tenant link.
entity_typeVarChar(50)Not Nulle.g. ‘activity’, ‘diary’
entity_idIntNot NullLinked object ID.
contentTextNot NullText content.

reactions

Like/Love reactions on various entities.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementReaction ID.
skole_idVarChar(15)FKMulti-tenant link.
entity_typeVarChar(50)Not Nulle.g. ‘activity’, ‘diary’
entity_idIntNot NullLinked object ID.
reaction_typeVarChar(20)Not Nulllike, love, etc.

6. Infrastructure & Security

Tables managing background tasks, sessions, and database state.

parent_devices

Registers parent devices for push notifications and mobile sessions.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementDevice Record ID.
skole_idVarChar(15)FKMulti-tenant link.
parent_idIntFKOwner parent ID.
session_tokenVarChar(255)UniqueAuth token.
fcm_tokenStringNot NullPush token.
platformStringNot NulliOS/Android.
device_nameStringNot Nulle.g. ‘iPhone 13’.
brandStringNot Nulle.g. ‘Apple’.
is_activeSmallIntNot Null1: Active, 0: Expired.

staff_sessions

Active sessions for staff members on the mobile app.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementSession ID.
skole_idVarChar(15)FKMulti-tenant link.
staff_idIntFK (staff)Logged in staff.
session_tokenVarChar(255)UniqueAuth token.
platformVarChar(50)NullableOS.
is_activeSmallIntDefault 1Status.

user_sessions

Web sessions for administrative users.
ColumnTypeConstraintsDescription
idIntPK, AutoIncrementSession ID.
user_idBigIntFK (users)Admin user.
session_tokenVarChar(255)UniqueWeb token.
device_nameVarChar(255)NullableBrowser/Device info.
is_activeSmallIntDefault 1Status.

failed_jobs

Logs for background worker failures.
ColumnTypeConstraintsDescription
idBigIntPK, AutoIncrementError ID.
uuidVarChar(191)Not NullUnique trace ID.
queueStringNot NullTarget queue.
payloadStringNot NullRaw data.
exceptionStringNot NullError message.
failed_atTimestampDefault NowError time.

personal_access_tokens

API tokens for different entities (admins, external integrations).
ColumnTypeConstraintsDescription
idBigIntPK, AutoIncrementToken ID.
tokenable_typeVarChar(191)Not NullModel class name.
tokenable_idBigIntNot NullModel instance ID.
nameVarChar(191)Not NullToken label.
tokenVarChar(64)Not NullHashed token.

Pulse Monitoring

Tables used for performance tracking and resource usage.
  • pulse_aggregates: Stores calculated metrics (sum, avg) over buckets of time.
  • pulse_entries: Real-time snapshots of system metrics.
  • pulse_values: Key-value pairs of system state at specific timestamps.

Relational Architecture

1. Multi-Tenancy Logic

The skole_id is the Universal Partition Key. Every query in the application must include this filter to ensure that Data from School A is never visible to School B.

2. Parent-Student Linkage

Unlike a direct Foreign Key, parents are linked to students via:
  • parent_details and student_guardian matching via student_roll_no.
  • staff_student mapping for teacher access control.

3. Soft Deletion Policy

Content tables (activities, digital_diary, noticeboards, write_to) utilize an integer deleted_status.
  • 0: Visible/Active.
  • 1: Soft-deleted (Excluded from most queries).