# Generated by Django 4.1.2 on 2022-10-13 00:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
[docs]class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='Event',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=100)),
('content', models.TextField()),
('slug', models.SlugField(max_length=250, unique_for_date='published')),
('date_posted', models.DateTimeField(default=django.utils.timezone.now)),
('start_date', models.DateTimeField(default=django.utils.timezone.now)),
('end_date', models.DateTimeField(default=django.utils.timezone.now)),
('status', models.CharField(choices=[('draft', 'Draft'), ('pending', 'Pending'), ('published', 'Published')], default='published', max_length=10)),
('category', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='backend.category')),
('mentor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mentor', to=settings.AUTH_USER_MODEL)),
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student', to=settings.AUTH_USER_MODEL)),
],
options={
'ordering': ('-date_posted',),
},
),
]