193 lines
7.5 KiB
Python
193 lines
7.5 KiB
Python
# Generated by Django 5.1.5 on 2025-01-16 16:52
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = []
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Student",
|
|
fields=[
|
|
("id", models.AutoField(primary_key=True, serialize=False)),
|
|
("first_name", models.CharField(max_length=255)),
|
|
(
|
|
"middle_name",
|
|
models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
("last_name", models.CharField(max_length=255)),
|
|
("username", models.CharField(max_length=255)),
|
|
("password", models.CharField(max_length=255)),
|
|
(
|
|
"phone",
|
|
models.CharField(
|
|
max_length=10,
|
|
validators=[
|
|
django.core.validators.RegexValidator("^\\+?1?\\d{9,15}$")
|
|
],
|
|
),
|
|
),
|
|
("email", models.EmailField(max_length=255, unique=True)),
|
|
("dob", models.DateField()),
|
|
(
|
|
"gender",
|
|
models.CharField(
|
|
choices=[("M", "Male"), ("F", "Female")], max_length=1
|
|
),
|
|
),
|
|
("address", models.CharField(max_length=255)),
|
|
("father_name", models.CharField(max_length=255)),
|
|
("mother_name", models.CharField(max_length=255)),
|
|
(
|
|
"parents_number",
|
|
models.CharField(
|
|
max_length=10,
|
|
validators=[
|
|
django.core.validators.RegexValidator("^\\+?1?\\d{9,15}$")
|
|
],
|
|
),
|
|
),
|
|
(
|
|
"father_occupation",
|
|
models.CharField(
|
|
choices=[
|
|
("business", "Business"),
|
|
("doctor", "Doctor"),
|
|
("farmer", "Farmer"),
|
|
("teacher", "teacher"),
|
|
("public service", "Public Service"),
|
|
("private service", "Private Service"),
|
|
("shopkeeper", "Shopkeeper"),
|
|
("driver", "Driver"),
|
|
("housewife", "HouseWife"),
|
|
("worker", "Worker"),
|
|
("N/A", "N/A"),
|
|
],
|
|
default="N/A",
|
|
max_length=45,
|
|
),
|
|
),
|
|
(
|
|
"mother_occupation",
|
|
models.CharField(
|
|
choices=[
|
|
("business", "Business"),
|
|
("doctor", "Doctor"),
|
|
("farmer", "Farmer"),
|
|
("teacher", "teacher"),
|
|
("public service", "Public Service"),
|
|
("private service", "Private Service"),
|
|
("shopkeeper", "Shopkeeper"),
|
|
("driver", "Driver"),
|
|
("housewife", "HouseWife"),
|
|
("worker", "Worker"),
|
|
("N/A", "N/A"),
|
|
],
|
|
default="N/A",
|
|
max_length=45,
|
|
),
|
|
),
|
|
("guardian_name", models.CharField(max_length=255)),
|
|
(
|
|
"guardian_number",
|
|
models.CharField(
|
|
max_length=10,
|
|
validators=[
|
|
django.core.validators.RegexValidator("^\\+?1?\\d{9,15}$")
|
|
],
|
|
),
|
|
),
|
|
(
|
|
"relationship_with_student",
|
|
models.CharField(
|
|
choices=[
|
|
("father", "Father"),
|
|
("mother", "Mother"),
|
|
("brother", "Brother"),
|
|
("sister", "Sister"),
|
|
("uncle", "Uncle"),
|
|
("aunt", "Aunt"),
|
|
("grandfather", "Grandfather"),
|
|
],
|
|
max_length=45,
|
|
),
|
|
),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="Teacher",
|
|
fields=[
|
|
("id", models.AutoField(primary_key=True, serialize=False)),
|
|
("first_name", models.CharField(max_length=255)),
|
|
(
|
|
"middle_name",
|
|
models.CharField(blank=True, max_length=255, null=True),
|
|
),
|
|
("last_name", models.CharField(max_length=255)),
|
|
(
|
|
"phone",
|
|
models.CharField(
|
|
max_length=10,
|
|
validators=[
|
|
django.core.validators.RegexValidator("^\\+?1?\\d{9,15}$")
|
|
],
|
|
),
|
|
),
|
|
("email", models.EmailField(max_length=255, unique=True)),
|
|
("dob", models.DateField()),
|
|
(
|
|
"gender",
|
|
models.CharField(
|
|
choices=[("M", "Male"), ("F", "Female")], max_length=1
|
|
),
|
|
),
|
|
("address", models.CharField(max_length=255)),
|
|
("username", models.CharField(max_length=255)),
|
|
("password", models.CharField(max_length=255)),
|
|
(
|
|
"qualification",
|
|
models.CharField(
|
|
choices=[
|
|
("BA", "BA"),
|
|
("BBS", "BBS"),
|
|
("BE", "BE"),
|
|
("BEd", "BEd"),
|
|
("BSc", "BSc"),
|
|
("MA", "MA"),
|
|
("MSc", "MSc"),
|
|
("MBS", "MBS"),
|
|
("ME", "ME"),
|
|
("PhD", "PhD"),
|
|
("Others", "Others"),
|
|
],
|
|
max_length=45,
|
|
),
|
|
),
|
|
("specialization", models.CharField(max_length=255)),
|
|
(
|
|
"marital_status",
|
|
models.CharField(
|
|
choices=[
|
|
("married", "Married"),
|
|
("widowed", "Widowed"),
|
|
("separated", "Separated"),
|
|
("divorced", "Divorced"),
|
|
("single", "Single"),
|
|
],
|
|
max_length=10,
|
|
),
|
|
),
|
|
("date_of_joining", models.DateField()),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
),
|
|
]
|