ComptaInde/billing/migrations/0003_estimate_discount.py

43 lines
1.8 KiB
Python
Raw Normal View History

2024-06-16 11:07:59 +02:00
# Generated by Django 4.0 on 2024-04-27 13:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('billing', '0002_prestationtype_prestation_duration_and_more'),
]
operations = [
migrations.CreateModel(
name='Estimate',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Nom')),
('date', models.DateField(auto_now_add=True)),
('details', models.TextField()),
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='estimates', to='billing.client')),
],
options={
'verbose_name': 'Devis',
'verbose_name_plural': 'Devis',
},
),
migrations.CreateModel(
name='Discount',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('label', models.CharField(max_length=255, verbose_name='Libellé')),
('quantity', models.DecimalField(decimal_places=2, default=1, max_digits=5, verbose_name='Quantité')),
('unit', models.PositiveSmallIntegerField(choices=[(0, '%'), (1, '')], verbose_name='Unité')),
('contract', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discounts', to='billing.contract')),
],
options={
'verbose_name': 'Réduction',
'verbose_name_plural': 'Réductions',
},
),
]