money-manager/summary/migrations/0001_initial.py
2023-09-17 16:54:34 +08:00

58 lines
2.5 KiB
Python

# Generated by Django 4.2.5 on 2023-09-16 21:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('expenses', '0002_expensecategory_historicalexpensecategory_and_more'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='SaleSummary',
fields=[
],
options={
'verbose_name': 'Sale Summary',
'verbose_name_plural': 'Sales Summary',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('expenses.timesheet',),
),
migrations.CreateModel(
name='HistoricalSaleSummary',
fields=[
('id', models.BigIntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
('deleted', models.BooleanField(default=False)),
('shift_start', models.DateTimeField(blank=True, null=True)),
('shift_end', models.DateTimeField(blank=True, null=True)),
('break_start', models.DateTimeField(blank=True, null=True)),
('break_end', models.DateTimeField(blank=True, null=True)),
('submitted', models.DateTimeField(blank=True, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('rate', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='expenses.timesheetrate')),
],
options={
'verbose_name': 'historical Sale Summary',
'verbose_name_plural': 'historical Sales Summary',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
]