File size: 6,150 Bytes
788eab4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | # Entity Relationship Diagram (ERD)
The diagram below documents the database schema and relational constraints implemented in the Placement Engine.
```mermaid
erDiagram
students ||--o{ academic_records : "has"
students ||--o{ backlogs : "accumulates"
students ||--o{ gap_years : "records"
students ||--o{ offers : "receives"
students ||--o{ eligibility_decisions : "evaluated_in"
students ||--o{ slots : "assigned"
students ||--o| users : "linked_to"
companies ||--o{ drives : "sponsors"
drives ||--o{ drive_requirement_versions : "versions"
drives ||--o{ panels : "hosts"
drives ||--o{ eligibility_runs : "triggers"
drives ||--o{ eligibility_decisions : "generates"
drives ||--o{ slots : "schedules"
eligibility_runs ||--o{ eligibility_decisions : "contains"
rooms ||--o{ panels : "accommodates"
rooms ||--o{ slots : "hosts"
panels ||--o{ slots : "conducts"
schedules ||--o{ slots : "contains"
users ||--o{ sessions : "maintains"
students {
string id PK
string roll_no UK
string name
string email UK
string branch
string program
float cgpa
float tenth_percentage
float twelfth_percentage
float diploma_percentage
date date_of_birth
string gender
string caste
string religion
string category
int version
datetime created_at
datetime updated_at
}
academic_records {
string id PK
string student_id FK
int semester
float sgpa
datetime created_at
}
backlogs {
string id PK
string student_id FK
string subject
int semester
string status
date cleared_on
datetime created_at
}
gap_years {
string id PK
string student_id FK
int start_year
int end_year
int duration_years
string reason
string phase
datetime created_at
}
offers {
string id PK
string student_id FK
string company
float ctc_lpa
float fixed_pay_lpa
date offer_date
string source
boolean is_dream
string status
datetime created_at
}
companies {
string id PK
string name UK
string industry
string tier
string website
int version
datetime created_at
}
drives {
string id PK
string company_id FK
string company_name
date drive_date
string mode
float ctc_lpa
boolean is_dream
string status
int version
datetime created_at
}
drive_requirement_versions {
string id PK
string drive_id FK
int version_number
text raw_source_text
float parse_confidence
float min_cgpa
float min_tenth_percentage
float min_twelfth_percentage
float min_diploma_percentage
text allowed_branches_json
text allowed_programs_json
int max_active_backlogs
boolean allow_history_backlogs
int max_history_backlogs
int max_gap_years
boolean allow_gap_during_degree
text custom_rules_json
datetime created_at
}
policies {
string id PK
string name
int version
int max_offers_per_student
float dream_tier_ctc_lpa
float super_dream_tier_ctc_lpa
boolean allow_dream_upgrade
float upgrade_ctc_multiplier
boolean strict_backlog_cutoff
boolean allow_multiple_offers_if_different_tiers
boolean is_active
datetime created_at
}
eligibility_runs {
string id PK
string drive_id FK
string requirement_version_id
string policy_id
datetime executed_at
int total_evaluated
int total_eligible
int total_ineligible
string executed_by
}
eligibility_decisions {
string id PK
string run_id FK
string student_id FK
string drive_id FK
string status
text reasons_json
text rule_ids_json
datetime evaluated_at
}
rooms {
string id PK
string name UK
string building
int capacity
boolean has_computers
boolean is_active
datetime created_at
}
panels {
string id PK
string drive_id FK
string name
text interviewers_json
string room_id FK
datetime created_at
}
schedules {
string id PK
string name
int version
string status
text drive_ids_json
datetime created_at
}
slots {
string id PK
string schedule_id FK
string drive_id FK
string student_id FK
int round_number
string room_id FK
string panel_id FK
datetime start_time
datetime end_time
datetime created_at
}
events {
string id PK
string aggregate_type
string aggregate_id
string event_type
string actor
datetime timestamp
text payload_json
}
audit_log {
string id PK
string entity_type
string entity_id
string action
string actor
text changes_json
datetime timestamp
}
users {
string id PK
string username UK
string email UK
string password_hash
string role
boolean is_active
string student_id FK
datetime created_at
}
sessions {
string id PK
string user_id FK
datetime created_at
datetime expires_at
string ip_address
string user_agent
}
```
|