forked from DGNum/gestiojeux
32 lines
1.2 KiB
Python
32 lines
1.2 KiB
Python
# Generated by Django 4.2.8 on 2024-05-02 09:30
|
|
|
|
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=[
|
|
('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é')),
|
|
],
|
|
options={
|
|
'verbose_name': 'emprunt',
|
|
'verbose_name_plural': 'emprunts',
|
|
'ordering': ['borrow_date'],
|
|
'abstract': False,
|
|
},
|
|
),
|
|
]
|