40 lines
1.7 KiB
Python
40 lines
1.7 KiB
Python
# Generated by Django 5.2.7 on 2026-02-23 09:58
|
|
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Job',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('job_number', models.CharField(editable=False, max_length=20, unique=True)),
|
|
('client_name', models.CharField(max_length=255)),
|
|
('description', models.TextField(blank=True)),
|
|
('status', models.CharField(choices=[('draft', 'Draft'), ('active', 'Active'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='draft', max_length=20)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Agreement',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('agreement_date', models.DateField(default=django.utils.timezone.now)),
|
|
('terms', models.TextField()),
|
|
('scope_of_work', models.TextField()),
|
|
('total_value', models.DecimalField(decimal_places=2, default=0.0, max_digits=12)),
|
|
('job', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='agreement', to='core.job')),
|
|
],
|
|
),
|
|
]
|