Initial commit from monorepo
This commit is contained in:
68
teams_app/migrations/0001_initial.py
Normal file
68
teams_app/migrations/0001_initial.py
Normal file
@@ -0,0 +1,68 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-04 08:11
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Team',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('logto_org_id', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('status', models.CharField(choices=[('PENDING_KYC', 'Требуется KYC'), ('KYC_IN_REVIEW', 'KYC на рассмотрении'), ('KYC_APPROVED', 'KYC одобрен'), ('KYC_REJECTED', 'KYC отклонен'), ('SUSPENDED', 'Заблокировано')], default='PENDING_KYC', max_length=50)),
|
||||
('prefect_flow_run_id', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='owned_teams', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_team',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TeamInvitation',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('role', models.CharField(choices=[('OWNER', 'Владелец'), ('ADMIN', 'Администратор'), ('MANAGER', 'Менеджер'), ('MEMBER', 'Участник')], default='MEMBER', max_length=50)),
|
||||
('status', models.CharField(choices=[('PENDING', 'Ожидает ответа'), ('ACCEPTED', 'Принято'), ('DECLINED', 'Отклонено'), ('EXPIRED', 'Истекло')], default='PENDING', max_length=50)),
|
||||
('invited_by', models.CharField(max_length=255)),
|
||||
('expires_at', models.DateTimeField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='invitations', to='teams_app.team')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_invitation',
|
||||
'unique_together': {('team', 'email')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TeamMember',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)),
|
||||
('role', models.CharField(choices=[('OWNER', 'Владелец'), ('ADMIN', 'Администратор'), ('MANAGER', 'Менеджер'), ('MEMBER', 'Участник')], default='MEMBER', max_length=50)),
|
||||
('joined_at', models.DateTimeField(auto_now_add=True)),
|
||||
('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='members', to='teams_app.team')),
|
||||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='team_memberships', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_member',
|
||||
'unique_together': {('team', 'user')},
|
||||
},
|
||||
),
|
||||
]
|
||||
30
teams_app/migrations/0002_add_user_profile.py
Normal file
30
teams_app/migrations/0002_add_user_profile.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UserProfile',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('logto_id', models.CharField(max_length=255, unique=True)),
|
||||
('avatar_id', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('phone', models.CharField(blank=True, max_length=20, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('active_team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='active_profiles', to='teams_app.team')),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_user_profile',
|
||||
},
|
||||
),
|
||||
]
|
||||
18
teams_app/migrations/0003_add_team_type.py
Normal file
18
teams_app/migrations/0003_add_team_type.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-08 09:47
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0002_add_user_profile'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='team_type',
|
||||
field=models.CharField(choices=[('BUYER', 'Покупатель'), ('SELLER', 'Продавец')], default='BUYER', max_length=20),
|
||||
),
|
||||
]
|
||||
33
teams_app/migrations/0004_teamaddress.py
Normal file
33
teams_app/migrations/0004_teamaddress.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-09 03:18
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0003_add_team_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='TeamAddress',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('address', models.TextField()),
|
||||
('latitude', models.FloatField(blank=True, null=True)),
|
||||
('longitude', models.FloatField(blank=True, null=True)),
|
||||
('is_default', models.BooleanField(default=False)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='addresses', to='teams_app.team')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_address',
|
||||
},
|
||||
),
|
||||
]
|
||||
17
teams_app/migrations/0005_remove_team_prefect_flow_run_id.py
Normal file
17
teams_app/migrations/0005_remove_team_prefect_flow_run_id.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-16 01:42
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0004_teamaddress'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='team',
|
||||
name='prefect_flow_run_id',
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,59 @@
|
||||
# Generated manually
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0005_remove_team_prefect_flow_run_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# TeamAddress fields
|
||||
migrations.AddField(
|
||||
model_name='teamaddress',
|
||||
name='status',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('pending', 'Ожидает обработки'),
|
||||
('processing', 'Обрабатывается'),
|
||||
('ready', 'Готов'),
|
||||
('error', 'Ошибка'),
|
||||
],
|
||||
default='pending',
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='teamaddress',
|
||||
name='graph_node_id',
|
||||
field=models.CharField(blank=True, max_length=100, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='teamaddress',
|
||||
name='processed_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='teamaddress',
|
||||
name='error_message',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
# Team selected location fields
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='selected_location_type',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[('address', 'Адрес'), ('hub', 'Хаб')],
|
||||
max_length=20,
|
||||
null=True,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='selected_location_uuid',
|
||||
field=models.CharField(blank=True, max_length=100, null=True),
|
||||
),
|
||||
]
|
||||
18
teams_app/migrations/0007_teamaddress_country_code.py
Normal file
18
teams_app/migrations/0007_teamaddress_country_code.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-16 12:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0006_add_address_status_and_selected_location'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='teamaddress',
|
||||
name='country_code',
|
||||
field=models.CharField(blank=True, max_length=2, null=True),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
# Generated manually
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0007_teamaddress_country_code'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='teamaddress',
|
||||
name='graph_node_id',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='teamaddress',
|
||||
name='status',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('pending', 'Ожидает обработки'),
|
||||
('processing', 'Обрабатывается'),
|
||||
('ready', 'Готов'),
|
||||
('error', 'Ошибка')
|
||||
],
|
||||
default='processing',
|
||||
max_length=20
|
||||
),
|
||||
),
|
||||
]
|
||||
18
teams_app/migrations/0009_alter_teamaddress_status.py
Normal file
18
teams_app/migrations/0009_alter_teamaddress_status.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-30 02:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0008_remove_graph_node_id_and_change_default_status'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='teamaddress',
|
||||
name='status',
|
||||
field=models.CharField(choices=[('pending', 'Ожидает обработки'), ('active', 'Активен'), ('error', 'Ошибка')], default='pending', max_length=20),
|
||||
),
|
||||
]
|
||||
17
teams_app/migrations/0010_remove_team_status.py
Normal file
17
teams_app/migrations/0010_remove_team_status.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-30 03:00
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0009_alter_teamaddress_status'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='team',
|
||||
name='status',
|
||||
),
|
||||
]
|
||||
30
teams_app/migrations/0011_teaminvitationtoken.py
Normal file
30
teams_app/migrations/0011_teaminvitationtoken.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-30 07:43
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0010_remove_team_status'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='TeamInvitationToken',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)),
|
||||
('token_hash', models.CharField(max_length=255, unique=True)),
|
||||
('workflow_status', models.CharField(choices=[('pending', 'Ожидает обработки'), ('active', 'Активен'), ('error', 'Ошибка')], default='pending', max_length=20)),
|
||||
('expires_at', models.DateTimeField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('invitation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tokens', to='teams_app.teaminvitation')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'teams_invitation_token',
|
||||
},
|
||||
),
|
||||
]
|
||||
28
teams_app/migrations/0012_add_selected_location_details.py
Normal file
28
teams_app/migrations/0012_add_selected_location_details.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.8 on 2026-01-03 05:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('teams_app', '0011_teaminvitationtoken'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='selected_location_latitude',
|
||||
field=models.FloatField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='selected_location_longitude',
|
||||
field=models.FloatField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='team',
|
||||
name='selected_location_name',
|
||||
field=models.CharField(blank=True, max_length=255, null=True),
|
||||
),
|
||||
]
|
||||
0
teams_app/migrations/__init__.py
Normal file
0
teams_app/migrations/__init__.py
Normal file
BIN
teams_app/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
BIN
teams_app/migrations/__pycache__/0001_initial.cpython-313.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
teams_app/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
teams_app/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user