add company app
This commit is contained in:
44
core/apps/company/migrations/0001_initial.py
Normal file
44
core/apps/company/migrations/0001_initial.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-01 10:39
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Company',
|
||||
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(db_index=True, max_length=200, unique=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Kompaniya',
|
||||
'verbose_name_plural': 'Kompaniyalar',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Barnch',
|
||||
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)),
|
||||
('location', models.CharField(max_length=250)),
|
||||
('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='branches', to='company.company')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Filial',
|
||||
'verbose_name_plural': 'Filialar',
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user