38 lines
1.6 KiB
Python
38 lines
1.6 KiB
Python
# Generated by Django 4.2.11 on 2024-04-02 17:05
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('users', '0001_initial'),
|
|
('tree', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Event',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('title', models.CharField(max_length=255)),
|
|
('start_date', models.DateField(blank=True, null=True)),
|
|
('end_date', models.DateField(blank=True, null=True)),
|
|
('description', models.TextField(default='')),
|
|
('is_online', models.BooleanField(default=True, verbose_name='оффлайн или онлайн')),
|
|
('location', models.CharField(default='', max_length=512)),
|
|
('limitation', models.CharField(choices=[('Everyone', 'everyone'), ('School', 'school'), ('Student', 'student'), ('Professional', 'professional')], default='everyone', max_length=64)),
|
|
('tree', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='events', to='tree.tree')),
|
|
('users', models.ManyToManyField(blank=True, related_name='events', to='users.user')),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
),
|
|
]
|