ComptaInde/compta/migrations/0001_initial.py

68 lines
3.2 KiB
Python

# Generated by Django 4.0 on 2024-04-25 17:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DescriptionType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Nom')),
('year', models.IntegerField(verbose_name='Année')),
('quotity', models.DecimalField(decimal_places=2, max_digits=3, verbose_name='Quotité')),
],
options={
'verbose_name': 'Catégorie',
'verbose_name_plural': 'Catégories',
},
),
migrations.CreateModel(
name='TvaType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('label', models.CharField(blank=True, max_length=255, verbose_name='Nom')),
('percent', models.DecimalField(decimal_places=3, max_digits=4, verbose_name='Pourcentage')),
('datebegin', models.DateField()),
('dateend', models.DateField(blank=True, null=True)),
],
options={
'verbose_name': 'Type de TVA',
'verbose_name_plural': 'Types de TVA',
},
),
migrations.CreateModel(
name='Transaction',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('information', models.CharField(max_length=255)),
('amountTva', models.DecimalField(blank=True, decimal_places=2, max_digits=5, verbose_name='Montant (TVAC)')),
('amountHTva', models.DecimalField(blank=True, decimal_places=2, max_digits=5, verbose_name='Montant (HTVA)')),
('amountDeductible', models.DecimalField(blank=True, decimal_places=2, max_digits=5, verbose_name='Montant Déductible')),
('paid', models.BooleanField(blank=True, default=False, verbose_name='Payé ?')),
('ticket', models.BooleanField(blank=True, default=False, verbose_name='Ticket ?')),
('notes', models.TextField(blank=True, null=True)),
('quotity', models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True, verbose_name='Quotité')),
('description', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='TransactionsDesc', to='compta.descriptiontype')),
],
options={
'verbose_name': 'Transaction',
'verbose_name_plural': 'Transactions',
},
),
migrations.AddField(
model_name='descriptiontype',
name='tva_type',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='get_descriptiontype', to='compta.tvatype'),
),
]