|
|
|
@ -10,63 +10,136 @@ class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
]
|
|
|
|
|
dependencies = []
|
|
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Helper',
|
|
|
|
|
name="Helper",
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('phone', phonenumber_field.modelfields.PhoneNumberField(editable=False, max_length=128, region=None, unique=True)),
|
|
|
|
|
('name', models.CharField(max_length=200)),
|
|
|
|
|
('number_validated', models.BooleanField(default=False)),
|
|
|
|
|
(
|
|
|
|
|
"id",
|
|
|
|
|
models.BigAutoField(
|
|
|
|
|
auto_created=True,
|
|
|
|
|
primary_key=True,
|
|
|
|
|
serialize=False,
|
|
|
|
|
verbose_name="ID",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
"phone",
|
|
|
|
|
phonenumber_field.modelfields.PhoneNumberField(
|
|
|
|
|
editable=False, max_length=128, region=None, unique=True
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
("name", models.CharField(max_length=200)),
|
|
|
|
|
("number_validated", models.BooleanField(default=False)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Room',
|
|
|
|
|
name="Room",
|
|
|
|
|
fields=[
|
|
|
|
|
('name', models.CharField(max_length=200, primary_key=True, serialize=False)),
|
|
|
|
|
('required_helpers', models.IntegerField()),
|
|
|
|
|
(
|
|
|
|
|
"name",
|
|
|
|
|
models.CharField(max_length=200, primary_key=True, serialize=False),
|
|
|
|
|
),
|
|
|
|
|
("required_helpers", models.IntegerField()),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Shift',
|
|
|
|
|
name="Shift",
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('start_at', models.DateTimeField()),
|
|
|
|
|
('duration', models.DurationField()),
|
|
|
|
|
('deleted', models.BooleanField(default=False)),
|
|
|
|
|
('room', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='app.room')),
|
|
|
|
|
(
|
|
|
|
|
"id",
|
|
|
|
|
models.BigAutoField(
|
|
|
|
|
auto_created=True,
|
|
|
|
|
primary_key=True,
|
|
|
|
|
serialize=False,
|
|
|
|
|
verbose_name="ID",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
("start_at", models.DateTimeField()),
|
|
|
|
|
("duration", models.DurationField()),
|
|
|
|
|
("deleted", models.BooleanField(default=False)),
|
|
|
|
|
(
|
|
|
|
|
"room",
|
|
|
|
|
models.ForeignKey(
|
|
|
|
|
on_delete=django.db.models.deletion.RESTRICT, to="app.room"
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Message',
|
|
|
|
|
name="Message",
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('text', models.CharField(max_length=160)),
|
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
|
|
|
|
|
(
|
|
|
|
|
"id",
|
|
|
|
|
models.BigAutoField(
|
|
|
|
|
auto_created=True,
|
|
|
|
|
primary_key=True,
|
|
|
|
|
serialize=False,
|
|
|
|
|
verbose_name="ID",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
("text", models.CharField(max_length=160)),
|
|
|
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
(
|
|
|
|
|
"to",
|
|
|
|
|
models.ForeignKey(
|
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='LoginToken',
|
|
|
|
|
name="LoginToken",
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.CharField(default=shiftregister.app.models.gen_token, editable=False, max_length=20, primary_key=True, serialize=False)),
|
|
|
|
|
('sent_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
('helper', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
|
|
|
|
|
(
|
|
|
|
|
"id",
|
|
|
|
|
models.CharField(
|
|
|
|
|
default=shiftregister.app.models.gen_token,
|
|
|
|
|
editable=False,
|
|
|
|
|
max_length=20,
|
|
|
|
|
primary_key=True,
|
|
|
|
|
serialize=False,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
("sent_at", models.DateTimeField(auto_now_add=True)),
|
|
|
|
|
(
|
|
|
|
|
"helper",
|
|
|
|
|
models.ForeignKey(
|
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='ShiftRegistration',
|
|
|
|
|
name="ShiftRegistration",
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('reminder_sent', models.BooleanField(default=False)),
|
|
|
|
|
('helper', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
|
|
|
|
|
('shift', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='app.shift')),
|
|
|
|
|
(
|
|
|
|
|
"id",
|
|
|
|
|
models.BigAutoField(
|
|
|
|
|
auto_created=True,
|
|
|
|
|
primary_key=True,
|
|
|
|
|
serialize=False,
|
|
|
|
|
verbose_name="ID",
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
("reminder_sent", models.BooleanField(default=False)),
|
|
|
|
|
(
|
|
|
|
|
"helper",
|
|
|
|
|
models.ForeignKey(
|
|
|
|
|
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
(
|
|
|
|
|
"shift",
|
|
|
|
|
models.ForeignKey(
|
|
|
|
|
on_delete=django.db.models.deletion.RESTRICT, to="app.shift"
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
options={
|
|
|
|
|
'unique_together': {('shift', 'helper')},
|
|
|
|
|
"unique_together": {("shift", "helper")},
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|