start to write contract apis
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.2 on 2025-07-15 15:55
|
||||
# Generated by Django 5.2 on 2025-07-16 14:45
|
||||
|
||||
import django.contrib.postgres.fields
|
||||
import django.db.models.deletion
|
||||
@@ -26,12 +26,11 @@ class Migration(migrations.Migration):
|
||||
('contract_number', models.PositiveIntegerField()),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('sides', models.CharField(choices=[('two_or_more', 'two or more'), ('customer_only', 'customer only'), ('only_company', 'onlycompany')], max_length=13)),
|
||||
('status', models.CharField(choices=[('created', 'created'), ('signed_company', 'signed by company'), ('signed_customer', 'signed by customer'), ('cancelled', 'cancelled')], max_length=15)),
|
||||
('status', models.CharField(choices=[('created', 'created'), ('signed_company', 'signed by company'), ('signed_customer', 'signed by customer'), ('cancelled', 'cancelled')], default='created', max_length=15)),
|
||||
('face_id', models.BooleanField(default=False)),
|
||||
('attach_file', models.BooleanField(default=False)),
|
||||
('add_folder', models.BooleanField(default=False)),
|
||||
('add_notification', models.BooleanField(default=False)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contracts', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'contract',
|
||||
@@ -94,6 +93,7 @@ class Migration(migrations.Migration):
|
||||
'verbose_name': 'contract side',
|
||||
'verbose_name_plural': 'contract sides',
|
||||
'db_table': 'contracts_sides',
|
||||
'unique_together': {('contract', 'user')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
@@ -102,8 +102,8 @@ class Migration(migrations.Migration):
|
||||
('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)),
|
||||
('status', models.CharField(choices=[('signed', 'signed'), ('organized', 'organized')], max_length=20)),
|
||||
('signature_type', models.CharField(choices=[('sms_sign', 'sms signature'), ('electronic_sing', 'electronic signature')], max_length=20)),
|
||||
('status', models.CharField(choices=[('signed', 'signed'), ('organized', 'organized')], default='organized', max_length=20)),
|
||||
('signature_type', models.CharField(blank=True, choices=[('sms_sign', 'sms signature'), ('electronic_sing', 'electronic signature')], max_length=20, null=True)),
|
||||
('is_signature', models.BooleanField(default=False)),
|
||||
('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contract_signatures', to='contracts.contract')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contract_users', to=settings.AUTH_USER_MODEL)),
|
||||
@@ -111,6 +111,7 @@ class Migration(migrations.Migration):
|
||||
options={
|
||||
'verbose_name': 'contract signatures',
|
||||
'db_table': 'contract_signatures',
|
||||
'unique_together': {('contract', 'user')},
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user