# Generated by Django 6.0.5 on 2026-06-01 06:37

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("community", "0005_deal_event_kazijob_lostfound_eventrsvp"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="AttachmentPost",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("company", models.CharField(max_length=200)),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                ("location", models.CharField(blank=True, max_length=200)),
                ("course", models.CharField(blank=True, max_length=100)),
                ("duration", models.CharField(blank=True, max_length=100)),
                ("deadline", models.DateField(blank=True, null=True)),
                ("phone", models.CharField(blank=True, max_length=20)),
                ("email", models.EmailField(blank=True, max_length=254)),
                ("is_active", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "posted_by",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="attachment_posts",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="CampusListing",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "university",
                    models.CharField(
                        choices=[
                            ("mku", "Mount Kenya University"),
                            ("dkut", "Dedan Kimathi University"),
                            ("kca", "KCA University"),
                            ("other", "Other"),
                        ],
                        default="mku",
                        max_length=20,
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                (
                    "price",
                    models.DecimalField(
                        blank=True, decimal_places=2, max_digits=10, null=True
                    ),
                ),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("textbook", "Textbook"),
                            ("notes", "Notes / Past Papers"),
                            ("laptop", "Laptop / Electronics"),
                            ("uniform", "Uniform / Clothes"),
                            ("other", "Other"),
                        ],
                        default="other",
                        max_length=20,
                    ),
                ),
                ("unit_code", models.CharField(blank=True, max_length=20)),
                ("course", models.CharField(blank=True, max_length=100)),
                ("phone", models.CharField(blank=True, max_length=20)),
                (
                    "image",
                    models.ImageField(
                        blank=True, null=True, upload_to="campus/listings/"
                    ),
                ),
                ("is_available", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "seller",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="campus_listings",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="CampusNotice",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "university",
                    models.CharField(
                        choices=[
                            ("mku", "Mount Kenya University"),
                            ("dkut", "Dedan Kimathi University"),
                            ("kca", "KCA University"),
                            ("other", "Other"),
                        ],
                        default="mku",
                        max_length=20,
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("body", models.TextField()),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("lecture", "Lecture Update"),
                            ("cat", "CAT / Test"),
                            ("exam", "Exam"),
                            ("result", "Results"),
                            ("event", "Campus Event"),
                            ("attachment", "Attachment / Internship"),
                            ("general", "General"),
                        ],
                        default="general",
                        max_length=20,
                    ),
                ),
                ("course", models.CharField(blank=True, max_length=100)),
                ("unit_code", models.CharField(blank=True, max_length=20)),
                (
                    "image",
                    models.ImageField(
                        blank=True, null=True, upload_to="campus/notices/"
                    ),
                ),
                ("link", models.URLField(blank=True, null=True)),
                ("is_active", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "posted_by",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="campus_notices",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="HostelListing",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                (
                    "hostel_type",
                    models.CharField(
                        choices=[
                            ("bedsitter", "Bedsitter"),
                            ("single", "Single Room"),
                            ("double", "Double Room"),
                            ("studio", "Studio"),
                            ("shared", "Shared"),
                        ],
                        default="bedsitter",
                        max_length=20,
                    ),
                ),
                (
                    "university",
                    models.CharField(
                        choices=[
                            ("mku", "Mount Kenya University"),
                            ("dkut", "Dedan Kimathi University"),
                            ("kca", "KCA University"),
                            ("other", "Other"),
                        ],
                        default="mku",
                        max_length=20,
                    ),
                ),
                ("location", models.CharField(max_length=300)),
                (
                    "distance",
                    models.CharField(
                        blank=True,
                        help_text="Distance from campus e.g. 5 min walk",
                        max_length=100,
                    ),
                ),
                ("price", models.DecimalField(decimal_places=2, max_digits=10)),
                ("phone", models.CharField(blank=True, max_length=20)),
                (
                    "image",
                    models.ImageField(
                        blank=True, null=True, upload_to="campus/hostels/"
                    ),
                ),
                ("is_available", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "landlord",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="hostel_listings",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
    ]
