initial commit
This commit is contained in:
Executable
+39
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-18 17:43
|
||||
|
||||
import datetime
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Account',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('surname', models.CharField(max_length=60, verbose_name='Фамилия')),
|
||||
('name', models.CharField(max_length=60, verbose_name='Имя')),
|
||||
('phone', models.CharField(max_length=16, unique=True, validators=[django.core.validators.RegexValidator(regex='^\\+7[0-9]{10}$')], verbose_name='Телефон')),
|
||||
('password', models.CharField(max_length=64, verbose_name='Хеш пароля')),
|
||||
('role', models.IntegerField(choices=[(0, 'Заказчик'), (1, 'Исполнитель'), (2, 'Модератор'), (3, 'Админ')])),
|
||||
('is_staff', models.BooleanField(default=False, verbose_name='Разрешение на вход в админку')),
|
||||
('register_datetime', models.DateTimeField(default=datetime.datetime.now, editable=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AccessToken',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('access_token', models.CharField(editable=False, max_length=128, unique=True)),
|
||||
('creation_time', models.DateTimeField(default=datetime.datetime.now)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.account')),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-20 10:54
|
||||
|
||||
import api.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='role',
|
||||
field=models.SmallIntegerField(choices=[(0, 'Заказчик'), (1, 'Исполнитель'), (2, 'Модератор'), (3, 'Админ')]),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ExecutorAccount',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('executor_type', models.SmallIntegerField(choices=[(0, 'самозанятый'), (1, 'юр. лицо')], verbose_name='Тип исполнителя')),
|
||||
('inn', models.CharField(max_length=10, validators=[django.core.validators.RegexValidator(regex='^[0-9]{10}$')], verbose_name='ИНН')),
|
||||
('additional_info', models.JSONField(default=api.models._executor_additional_info_default, verbose_name='Дополнительные данные')),
|
||||
('account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='api.account')),
|
||||
],
|
||||
),
|
||||
]
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-20 11:03
|
||||
|
||||
import api.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0002_alter_account_role_executoraccount'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='account',
|
||||
name='is_staff',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='additional_info',
|
||||
field=models.JSONField(blank=True, default=api.models._executor_additional_info_default, verbose_name='Дополнительные данные'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-20 11:28
|
||||
|
||||
import api.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0003_remove_account_is_staff_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='executoraccount',
|
||||
name='id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='account',
|
||||
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='api.account'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='additional_info',
|
||||
field=models.JSONField(blank=True, default=api.models._executor_additional_info_default, null=True, verbose_name='Дополнительные данные'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='inn',
|
||||
field=models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator(regex='^[0-9]{10}$')], verbose_name='ИНН'),
|
||||
),
|
||||
]
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-21 21:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0004_remove_executoraccount_id_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='account',
|
||||
name='about',
|
||||
field=models.CharField(blank=True, default='', max_length=1000, verbose_name='О себе'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='role',
|
||||
field=models.SmallIntegerField(choices=[(0, 'Заказчик'), (1, 'Исполнитель')]),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,39 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-26 17:20
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0005_account_about_alter_account_role'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, default='', max_length=60, verbose_name='Имя'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='password',
|
||||
field=models.CharField(max_length=64, validators=[django.core.validators.RegexValidator(regex='^[\\wа-яА-Я]{6,}$')], verbose_name='Хеш пароля'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='role',
|
||||
field=models.SmallIntegerField(blank=True, choices=[(0, 'Заказчик'), (1, 'Исполнитель')], null=True, verbose_name='Роль'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='surname',
|
||||
field=models.CharField(blank=True, default='', max_length=60, verbose_name='Фамилия'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='inn',
|
||||
field=models.CharField(blank=True, max_length=12, null=True, validators=[django.core.validators.RegexValidator(regex='^[0-9]{10}$|^[0-9]{12}$')], verbose_name='ИНН'),
|
||||
),
|
||||
]
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 4.1.2 on 2022-10-26 17:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0006_alter_account_name_alter_account_password_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='role',
|
||||
field=models.SmallIntegerField(choices=[(0, 'Заказчик'), (1, 'Исполнитель')], default=0, verbose_name='Роль'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='executoraccount',
|
||||
name='executor_type',
|
||||
field=models.SmallIntegerField(blank=True, choices=[(0, 'самозанятый'), (1, 'юр. лицо')], null=True, verbose_name='Тип исполнителя'),
|
||||
),
|
||||
]
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.1.2 on 2022-11-04 19:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0007_alter_account_role_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='account',
|
||||
name='email',
|
||||
field=models.EmailField(blank=True, default=None, max_length=254, null=True, unique=True, verbose_name='Почта'),
|
||||
),
|
||||
]
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 4.1.2 on 2022-11-06 13:47
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0008_account_email'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='City',
|
||||
fields=[
|
||||
('code', models.CharField(max_length=20, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(regex='^[0-9a-zA-Z_]*$')], verbose_name='Код города')),
|
||||
('name', models.CharField(max_length=50, unique=True, verbose_name='Название города')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='account',
|
||||
name='city',
|
||||
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.city'),
|
||||
),
|
||||
]
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
# Generated by Django 4.1.2 on 2022-11-06 15:33
|
||||
|
||||
import datetime
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0009_city_account_city'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Order',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200, verbose_name='Название заказа')),
|
||||
('description', models.TextField(blank=True, verbose_name='Описание')),
|
||||
('square', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='Площадь в м²')),
|
||||
('work_time', models.CharField(blank=True, max_length=100, verbose_name='Рабочее время')),
|
||||
('type_of_renovation', models.CharField(blank=True, choices=[('', 'Не определено'), ('overhaul', 'Капитальный'), ('partial', 'Частичный'), ('redecor', 'Косметический'), ('premium', 'Премиальный'), ('design', 'Дизайнерский')], default='', max_length=10, verbose_name='Тип ремонта')),
|
||||
('type_of_house', models.CharField(blank=True, choices=[('block', 'Блочный'), ('brick', 'Кирпичный'), ('monolith', 'Монолит'), ('panel', 'Панельный')], default='', max_length=10, verbose_name='Тип дома')),
|
||||
('type_of_room', models.CharField(blank=True, choices=[('primary', 'Первичка'), ('secondary', 'Вторичка')], default='', max_length=10, verbose_name='Тип квартиры')),
|
||||
('purchase_of_material', models.CharField(blank=True, choices=[('executor', 'Исполнитель'), ('customer', 'Заказчик')], default='', max_length=10, verbose_name='Закуп материала')),
|
||||
('type_of_executor', models.CharField(blank=True, choices=[('individual', 'Самозанятый/бригада'), ('company', 'Компания')], default='', max_length=10, verbose_name='Тип исполнителя')),
|
||||
('is_with_warranty', models.BooleanField(default=True, verbose_name='С гарантией')),
|
||||
('is_with_contract', models.BooleanField(default=False, verbose_name='Работа по договору')),
|
||||
('is_require_design', models.BooleanField(default=False, verbose_name='Требуется дизайн проект')),
|
||||
('is_with_trade', models.BooleanField(default=False, verbose_name='Возможен торг')),
|
||||
('is_with_cleaning', models.BooleanField(default=False, verbose_name='С уборкой')),
|
||||
('is_with_garbage_removal', models.BooleanField(default=False, verbose_name='С вывозом мусора')),
|
||||
('approximate_price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Цена')),
|
||||
('date_start', models.DateField(blank=True, default=None, null=True, verbose_name='Дата начала')),
|
||||
('date_end', models.DateField(blank=True, default=None, null=True, verbose_name='Дата окончания')),
|
||||
('address_text', models.CharField(blank=True, max_length=70, verbose_name='Улица, дом')),
|
||||
('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email')),
|
||||
('phone', models.CharField(blank=True, max_length=16, null=True, validators=[django.core.validators.RegexValidator(regex='^\\+7[0-9]{10}$')], verbose_name='Телефон')),
|
||||
('create_time', models.DateTimeField(default=datetime.datetime.now, editable=False, verbose_name='Время создания')),
|
||||
('moderated', models.BooleanField(default=True, verbose_name='Модерирован')),
|
||||
('published', models.BooleanField(default=False, verbose_name='Опубликован')),
|
||||
('address_city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='address_city', to='api.city', verbose_name='Город')),
|
||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to='api.account', verbose_name='Владелец')),
|
||||
],
|
||||
),
|
||||
]
|
||||
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user