gestiojeux/inventory/migrations/0003_gameloan.py

33 lines
1.2 KiB
Python
Raw Normal View History

2024-05-02 11:31:34 +02:00
# Generated by Django 4.2.8 on 2024-05-02 09:30
2024-05-02 11:31:34 +02:00
import autoslug.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('inventory', '0002_duration_range'),
]
operations = [
migrations.CreateModel(
name='GameLoan',
fields=[
2024-05-02 11:31:34 +02:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='lent_object', unique=True)),
('borrow_date', models.DateTimeField(auto_now_add=True)),
('return_date', models.DateTimeField(null=True)),
('mail', models.EmailField(max_length=254)),
('lent_object', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.game', verbose_name='jeu emprunté')),
],
2024-05-02 11:31:34 +02:00
options={
'verbose_name': 'emprunt',
'verbose_name_plural': 'emprunts',
'ordering': ['borrow_date'],
'abstract': False,
},
),
]