# Generated by Django 3.0.6 on 2020-06-05 09:01

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('ugc_mod', '0002_modcomment_moduser_ugcmod'),
        ('ugc_server', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='UgcServer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('server_name', models.CharField(max_length=6, verbose_name='服务器名称')),
                ('server_password', models.CharField(max_length=32, null=True, verbose_name='服务器密码')),
                ('max_player', models.SmallIntegerField(verbose_name='服务器最大人数')),
                ('start_time', models.DateTimeField(verbose_name='起始时间')),
                ('end_time', models.DateTimeField(verbose_name='结束时间')),
                ('status', models.SmallIntegerField(verbose_name='服务器状态')),
            ],
            options={
                'verbose_name': 'ugc服务器表',
                'verbose_name_plural': 'ugc服务器表',
                'db_table': 'ugc_server',
            },
        ),
        migrations.CreateModel(
            name='ServerMod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mod', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ugc_mod.UgcMod')),
                ('server', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ugc_server.UgcServer')),
            ],
            options={
                'verbose_name': '服务器/Mod对应表',
                'verbose_name_plural': '服务器/Mod对应表',
                'db_table': 'server_mod',
                'unique_together': {('server', 'mod')},
                'index_together': {('server', 'mod')},
            },
        ),
    ]
