# Generated by Django 5.2.6 on 2026-04-08 02:04

import django.db.models.deletion
import teacher_management.models
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("departments", "0001_initial"),
        ("organization", "0001_initial"),
        ("status", "__first__"),
    ]

    operations = [
        migrations.CreateModel(
            name="Teacher",
            fields=[
                (
                    "is_global",
                    models.BooleanField(
                        default=False,
                        help_text="If true, this data is shared across all organizations.",
                    ),
                ),
                ("teacher_id", models.AutoField(primary_key=True, serialize=False)),
                ("first_name", models.CharField(max_length=100)),
                ("last_name", models.CharField(blank=True, max_length=100, null=True)),
                ("code", models.CharField(max_length=10, unique=True)),
                ("slug", models.SlugField(max_length=200, unique=True)),
                ("email", models.EmailField(max_length=254, unique=True)),
                ("phone", models.CharField(max_length=20)),
                ("title", models.CharField(blank=True, max_length=255, null=True)),
                ("hire_date", models.DateField(blank=True, null=True)),
                (
                    "department",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="teachers",
                        to="departments.department",
                    ),
                ),
                (
                    "organization",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(class)s_data",
                        to="organization.organization",
                    ),
                ),
                (
                    "status",
                    models.ForeignKey(
                        default=teacher_management.models.get_default_status_pk,
                        limit_choices_to={"type": "teacher"},
                        on_delete=django.db.models.deletion.CASCADE,
                        to="status.status",
                    ),
                ),
            ],
            options={
                "verbose_name": "Teacher",
                "verbose_name_plural": "Teachers",
                "db_table": "teacher",
            },
        ),
    ]
