add new model and change offer models
This commit is contained in:
36
core/apps/counterparty/migrations/0001_initial.py
Normal file
36
core/apps/counterparty/migrations/0001_initial.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-20 13:13
|
||||
|
||||
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='Counterparty',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('start_date', models.DateField()),
|
||||
('status', models.CharField(choices=[('active', 'active'), ('inactive', 'inactive')], default='active', max_length=20)),
|
||||
('type', models.CharField(choices=[('supplier', 'supplier')], max_length=20)),
|
||||
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='counterparties', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Kontragent',
|
||||
'verbose_name_plural': 'Kontragentlar',
|
||||
},
|
||||
),
|
||||
]
|
||||
0
core/apps/counterparty/migrations/__init__.py
Normal file
0
core/apps/counterparty/migrations/__init__.py
Normal file
Reference in New Issue
Block a user