Files
crmApi/apps/customer/migrations/0001_initial.py
T
2024-01-22 13:01:42 +03:30

105 lines
5.1 KiB
Python

# Generated by Django 4.2.1 on 2023-08-08 08:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('workspace', '0002_city'),
('cuser', '0002_roletype_cuserrole'),
]
operations = [
migrations.CreateModel(
name='ShiveAshenaei',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=15)),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ResponsibleGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=15)),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CustomerResponsible',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('cuser_role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cuser.cuserrole')),
('responsible_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.responsiblegroup')),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CustomerGroupType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=10)),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CustomerGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name', models.CharField(max_length=15)),
('group_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='customer.customergrouptype')),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Customer',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('name_family', models.CharField(max_length=25)),
('mobile', models.PositiveBigIntegerField(blank=True, null=True)),
('phone', models.PositiveBigIntegerField(blank=True, null=True)),
('address', models.CharField(max_length=100)),
('city', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='workspace.city')),
('cuser_role', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cuser.cuserrole')),
('responsible_group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='customer.responsiblegroup')),
('shive_ashenaei', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='customer.shiveashenaei')),
('sys_ws', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='workspace.workspace')),
],
options={
'abstract': False,
},
),
]