65 lines
2.3 KiB
Python
65 lines
2.3 KiB
Python
|
# Generated by Django 3.0.5 on 2020-04-14 15:36
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='GenereSerieTV',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('genere', models.CharField(max_length=120)),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Genere',
|
||
|
'verbose_name_plural': 'Generi',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='SerieTV',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('titolo', models.CharField(max_length=120)),
|
||
|
('descrizione', models.CharField(max_length=120)),
|
||
|
('genere', models.ManyToManyField(to='SerieTV.GenereSerieTV')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Serie TV',
|
||
|
'verbose_name_plural': 'Serie TV',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Stagioni',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('numero_stagione', models.IntegerField()),
|
||
|
('serie_tv', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='seriestagioni', to='SerieTV.SerieTV')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Stagione',
|
||
|
'verbose_name_plural': 'Stagioni',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Episodi',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('numero_episodio', models.IntegerField()),
|
||
|
('streaming_link', models.URLField()),
|
||
|
('stagione', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stagione', to='SerieTV.Stagioni')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Episodio',
|
||
|
'verbose_name_plural': 'Episodi',
|
||
|
},
|
||
|
),
|
||
|
]
|