39291-vm/core/migrations/0001_initial.py
Flatlogic Bot 46ee143ab1 1.1
2026-04-01 16:28:08 +00:00

39 lines
1.8 KiB
Python

# Generated by Django 5.2.7 on 2026-03-24 11:31
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Trip',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('start_time', models.TimeField()),
('end_time', models.TimeField()),
('start_location', models.CharField(max_length=255)),
('end_location', models.CharField(max_length=255)),
('business_purpose', models.TextField()),
('trip_type', models.CharField(choices=[('business', 'Business'), ('personal', 'Personal'), ('commuting', 'Commuting'), ('repair', 'Repair / Maintenance')], max_length=20)),
('start_odometer', models.DecimalField(blank=True, decimal_places=1, max_digits=10, null=True)),
('end_odometer', models.DecimalField(blank=True, decimal_places=1, max_digits=10, null=True)),
('distance_miles', models.DecimalField(blank=True, decimal_places=1, max_digits=8, null=True)),
('distance_source', models.CharField(choices=[('odometer', 'Odometer'), ('map', 'Google Maps')], default='map', max_length=20)),
('notes', models.TextField(blank=True)),
('created_at', models.DateTimeField(default=django.utils.timezone.now)),
('updated_at', models.DateTimeField(default=django.utils.timezone.now)),
],
options={
'ordering': ['-date', '-start_time', '-created_at'],
},
),
]