gestiojeux/loans/migrations/0001_initial.py
Sylvain Gay 474083dd38 Add minimal loans system
Functional loans system for users.
No manager interface yet.

See:
- app "loans"
- a few new views/templates in app "inventory"
2024-05-02 11:13:34 +02:00

33 lines
1.1 KiB
Python

# Generated by Django 4.2.8 on 2024-04-23 16:45
import autoslug.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('inventory', '0002_duration_range'),
]
operations = [
migrations.CreateModel(
name='Loan',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='game', unique=True)),
('borrow_date', models.DateTimeField(auto_now_add=True)),
('return_date', models.DateTimeField(null=True)),
('mail', models.EmailField(max_length=254)),
('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='loans', to='inventory.game', verbose_name='jeu emprunté')),
],
options={
'verbose_name': 'emprunt',
'verbose_name_plural': 'emprunts',
'ordering': ['borrow_date'],
},
),
]