# Generated by Django 2.2.10 on 2020-02-21 10:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_column='TITLE', max_length=30, verbose_name='제목')),
                ('content', models.TextField(db_column='CONTENT', verbose_name='내용')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('tag', models.CharField(db_column='TAG', default='자유', max_length=50, verbose_name='글 분류')),
                ('view', models.IntegerField(db_column='VIEW', default=0, verbose_name='조회수')),
                ('like', models.IntegerField(db_column='LIKE', default=0, verbose_name='추천수')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_article_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '게시글정보',
                'verbose_name_plural': '게시글정보',
                'db_table': 'ARTICLE',
                'ordering': ['id', 'date'],
            },
        ),
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=20, verbose_name='codename')),
                ('code', models.TextField(db_column='CODE', verbose_name='코드')),
                ('available_game', models.BooleanField(db_column='AVAILABLE_GAME', default=False, verbose_name='게임가능코드')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_code_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '코드정보',
                'verbose_name_plural': '코드정보',
                'db_table': 'CODE',
                'ordering': ['id', 'problem__id', 'author__id'],
            },
        ),
        migrations.CreateModel(
            name='GroupInfo',
            fields=[
                ('group', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='groupInfo', serialize=False, to='auth.Group', verbose_name='그룹')),
                ('ranking', models.IntegerField(db_column='RANKING', unique=True, verbose_name='랭킹')),
            ],
            options={
                'verbose_name': '그룹정보',
                'verbose_name_plural': '그룹정보',
                'db_table': 'GROUPINFO',
                'ordering': ['group__id'],
            },
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=30, unique=True, verbose_name='language name')),
                ('compileMessage', models.TextField(db_column='COMPILEMESSAGE', verbose_name='컴파일명령어')),
                ('runMessage', models.TextField(db_column='RUNMESSAGE', verbose_name='런명령어')),
            ],
            options={
                'verbose_name': '언어',
                'verbose_name_plural': '언어',
                'db_table': 'LANGUAGE',
                'ordering': ['id', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='서로게이트키')),
                ('title', models.CharField(db_column='TITLE', default=' ', max_length=50, verbose_name='문제이름')),
                ('description', models.TextField(db_column='DESCRIPTION', verbose_name='설명')),
                ('limit_time', models.IntegerField(db_column='LIMIT_TIME', default=1000, verbose_name='제한시간(ms)')),
                ('limit_memory', models.IntegerField(db_column='LIMIT_MEMORY', default=128, verbose_name='제한메모리(MB)')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('level', models.IntegerField(db_column='LEVEL', default=1, verbose_name='문제난이도')),
                ('popularity', models.IntegerField(db_column='POPULARITY', default=0, verbose_name='인기도')),
                ('icon', models.TextField(db_column='ICON', default='no icon', verbose_name='문제아이콘')),
                ('thumbnail', models.TextField(db_column='THUMBNAIL', default='no thumbnail', verbose_name='문제썸네일')),
                ('board_size', models.IntegerField(db_column='BOARD_SIZE', default=8, verbose_name='보드 크기')),
                ('board_shape', models.IntegerField(db_column='BOARD_SHAPE', default=0, verbose_name='보드 모양')),
                ('editor', models.ForeignKey(db_column='EDITOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_problem_editor', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '문제:기본정보',
                'verbose_name_plural': '문제:기본정보',
                'db_table': 'PROBLEM',
                'ordering': ['id', 'editor__id'],
            },
        ),
        migrations.CreateModel(
            name='RuleInfo',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=30, unique=True, verbose_name='rule name')),
                ('description', models.TextField(db_column='DESCRIPTION', verbose_name='규칙설명')),
                ('type', models.CharField(choices=[('placement', '착수'), ('action', '액션'), ('ending', '엔딩'), ('victory', '승리조건')], db_column='TYPE', max_length=30, verbose_name='규칙종류')),
            ],
            options={
                'verbose_name': '규칙정보',
                'verbose_name_plural': '규칙정보',
                'db_table': 'RULEINFO',
                'ordering': ['id', 'type'],
            },
        ),
        migrations.CreateModel(
            name='UserInformationInProblem',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(db_column='SCORE', default=0, verbose_name='점수')),
                ('tier', models.CharField(db_column='TIRE', default='Bronze', max_length=20, verbose_name='등급')),
                ('code', models.ForeignKey(db_column='CODE', default=1, on_delete=django.db.models.deletion.PROTECT, to='onepanman_api.Code', verbose_name='대표 코드')),
                ('problem', models.ForeignKey(db_column='PROBLEM', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='problem_userInformationInProblem_problem', to='onepanman_api.Problem', verbose_name='문제')),
                ('user', models.ForeignKey(db_column='USER', on_delete=django.db.models.deletion.PROTECT, related_name='user_userInformationInProblem_user', to=settings.AUTH_USER_MODEL, verbose_name='유저')),
            ],
            options={
                'verbose_name': '문제:유저점수정보',
                'verbose_name_plural': '문제:유저점수정보',
                'db_table': 'USERINFORMATIONINPROBLEM',
                'ordering': ['id', 'problem__id', 'score'],
            },
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('user', models.OneToOneField(db_column='USER', on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='user_userInfo_user', serialize=False, to=settings.AUTH_USER_MODEL, verbose_name='유저')),
                ('nickname', models.CharField(db_column='NICKNAME', default='Anonymous', max_length=40, verbose_name='닉네임')),
                ('heart', models.IntegerField(db_column='HEART', default=5, verbose_name='하트')),
                ('isCodeOpen', models.BooleanField(db_column='isCodeOpen', default=False, verbose_name='코드공개여부')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='가입날짜')),
                ('profileImage', models.TextField(db_column='PROFILEIMAGE', default='기본사진경로 넣기', verbose_name='프로필 사진')),
                ('group', models.ForeignKey(blank=True, db_column='GROUP', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='group_userInfo_group', to='auth.Group', verbose_name='그룹')),
                ('language', models.ForeignKey(db_column='LANGUAGE', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='language_userInfo_language', to='onepanman_api.Language', verbose_name='주 사용 언어')),
            ],
            options={
                'verbose_name': '유저 정보',
                'verbose_name_plural': '유저 정보',
                'db_table': 'USERINFO',
                'ordering': ['user'],
            },
        ),
        migrations.CreateModel(
            name='Testcase',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('testcase_index', models.IntegerField(db_column='TESTCASE_INDEX', verbose_name='TestCase 번호')),
                ('testcase', models.TextField(db_column='TESTCASE', verbose_name='TestCase')),
                ('problem', models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_testcase_problem', to='onepanman_api.Problem')),
            ],
            options={
                'verbose_name': '테스트케이스',
                'verbose_name_plural': '테스트케이스',
                'db_table': 'TESTCASE',
                'ordering': ['id', 'problem__id'],
            },
        ),
        migrations.CreateModel(
            name='Notice',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_column='TITLE', max_length=50, verbose_name='제목')),
                ('content', models.TextField(db_column='CONTENT', verbose_name='내용')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성시간')),
                ('isRead', models.BooleanField(db_column='isREAD', default=False, verbose_name='읽음여부')),
                ('receiver', models.ForeignKey(db_column='RECEIVER', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='user_notice_receiver', to=settings.AUTH_USER_MODEL, verbose_name='수신자')),
                ('sender', models.ForeignKey(db_column='SENDER', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='user_notice_sender', to=settings.AUTH_USER_MODEL, verbose_name='발신자')),
            ],
            options={
                'verbose_name': '알림정보',
                'verbose_name_plural': '알림정보',
                'db_table': 'NOTICE',
                'ordering': ['id', 'date'],
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('record', models.TextField(db_column='RECORD', verbose_name='게임기록')),
                ('winner', models.IntegerField(db_column='WINNER', default=0, verbose_name='승리자')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='대전 시각')),
                ('challenger', models.ForeignKey(db_column='CHALLENGER', on_delete=django.db.models.deletion.PROTECT, related_name='user_game_challenger', to=settings.AUTH_USER_MODEL)),
                ('challenger_code', models.ForeignKey(db_column='CHALLENGER_CODE', on_delete=django.db.models.deletion.PROTECT, related_name='code_game_challenger_code', to='onepanman_api.Code', verbose_name='도전자코드')),
                ('opposite', models.ForeignKey(db_column='OPPOSITE', on_delete=django.db.models.deletion.PROTECT, related_name='user_game_opposite', to=settings.AUTH_USER_MODEL)),
                ('opposite_code', models.ForeignKey(db_column='OPPOSITE_CODE', on_delete=django.db.models.deletion.PROTECT, related_name='code_game_opposite_code', to='onepanman_api.Code', verbose_name='상대방코드')),
                ('problem', models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_game_problem', to='onepanman_api.Problem')),
            ],
            options={
                'verbose_name': '게임정보',
                'verbose_name_plural': '게임정보',
                'db_table': 'GAME',
                'ordering': ['id', 'problem__id', '-date'],
            },
        ),
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('isAccept', models.BooleanField(db_column='isAccept', default=False, verbose_name='수락여부')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='신청/수락 날짜')),
                ('user1', models.ForeignKey(db_column='USER1', on_delete=django.db.models.deletion.CASCADE, related_name='user_friend_user1', to=settings.AUTH_USER_MODEL, verbose_name='유저 1')),
                ('user2', models.ForeignKey(db_column='USER2', on_delete=django.db.models.deletion.CASCADE, related_name='user_friend_user2', to=settings.AUTH_USER_MODEL, verbose_name='유저 2')),
            ],
            options={
                'verbose_name': '친구정보',
                'verbose_name_plural': '친구정보',
                'db_table': 'FRIEND',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_index', models.IntegerField(db_column='COMMENT_INDEX', default=1, verbose_name='댓글 번호')),
                ('comment', models.TextField(db_column='COMMENT', default=' ', verbose_name='댓글')),
                ('like', models.IntegerField(db_column='LIKE', default=0, verbose_name='추천수')),
                ('hate', models.IntegerField(db_column='HATE', default=0, verbose_name='비추천수')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', null=True, verbose_name='작성시간')),
                ('article', models.ForeignKey(db_column='ARTICLE', on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='onepanman_api.Article', verbose_name='게시글')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.CASCADE, related_name='user_comment_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '댓글 정보',
                'verbose_name_plural': '댓글 정보',
                'db_table': 'COMMENT',
                'ordering': ['id', 'article__id', 'comment_index'],
            },
        ),
        migrations.AddField(
            model_name='code',
            name='language',
            field=models.ForeignKey(db_column='LANGUAGE', on_delete=django.db.models.deletion.PROTECT, related_name='language_code_language', to='onepanman_api.Language', verbose_name='언어'),
        ),
        migrations.AddField(
            model_name='code',
            name='problem',
            field=models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_code_problem', to='onepanman_api.Problem', verbose_name='문제'),
        ),
    ]

# Generated by Django 2.2.10 on 2020-02-21 10:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_column='TITLE', max_length=30, verbose_name='제목')),
                ('content', models.TextField(db_column='CONTENT', verbose_name='내용')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('tag', models.CharField(db_column='TAG', default='자유', max_length=50, verbose_name='글 분류')),
                ('view', models.IntegerField(db_column='VIEW', default=0, verbose_name='조회수')),
                ('like', models.IntegerField(db_column='LIKE', default=0, verbose_name='추천수')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_article_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '게시글정보',
                'verbose_name_plural': '게시글정보',
                'db_table': 'ARTICLE',
                'ordering': ['id', 'date'],
            },
        ),
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=20, verbose_name='codename')),
                ('code', models.TextField(db_column='CODE', verbose_name='코드')),
                ('available_game', models.BooleanField(db_column='AVAILABLE_GAME', default=False, verbose_name='게임가능코드')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_code_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '코드정보',
                'verbose_name_plural': '코드정보',
                'db_table': 'CODE',
                'ordering': ['id', 'problem__id', 'author__id'],
            },
        ),
        migrations.CreateModel(
            name='GroupInfo',
            fields=[
                ('group', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='groupInfo', serialize=False, to='auth.Group', verbose_name='그룹')),
                ('ranking', models.IntegerField(db_column='RANKING', unique=True, verbose_name='랭킹')),
            ],
            options={
                'verbose_name': '그룹정보',
                'verbose_name_plural': '그룹정보',
                'db_table': 'GROUPINFO',
                'ordering': ['group__id'],
            },
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=30, unique=True, verbose_name='language name')),
                ('compileMessage', models.TextField(db_column='COMPILEMESSAGE', verbose_name='컴파일명령어')),
                ('runMessage', models.TextField(db_column='RUNMESSAGE', verbose_name='런명령어')),
            ],
            options={
                'verbose_name': '언어',
                'verbose_name_plural': '언어',
                'db_table': 'LANGUAGE',
                'ordering': ['id', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='서로게이트키')),
                ('title', models.CharField(db_column='TITLE', default=' ', max_length=50, verbose_name='문제이름')),
                ('description', models.TextField(db_column='DESCRIPTION', verbose_name='설명')),
                ('limit_time', models.IntegerField(db_column='LIMIT_TIME', default=1000, verbose_name='제한시간(ms)')),
                ('limit_memory', models.IntegerField(db_column='LIMIT_MEMORY', default=128, verbose_name='제한메모리(MB)')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성/수정일')),
                ('level', models.IntegerField(db_column='LEVEL', default=1, verbose_name='문제난이도')),
                ('popularity', models.IntegerField(db_column='POPULARITY', default=0, verbose_name='인기도')),
                ('icon', models.TextField(db_column='ICON', default='no icon', verbose_name='문제아이콘')),
                ('thumbnail', models.TextField(db_column='THUMBNAIL', default='no thumbnail', verbose_name='문제썸네일')),
                ('board_size', models.IntegerField(db_column='BOARD_SIZE', default=8, verbose_name='보드 크기')),
                ('board_shape', models.IntegerField(db_column='BOARD_SHAPE', default=0, verbose_name='보드 모양')),
                ('editor', models.ForeignKey(db_column='EDITOR', on_delete=django.db.models.deletion.PROTECT, related_name='user_problem_editor', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '문제:기본정보',
                'verbose_name_plural': '문제:기본정보',
                'db_table': 'PROBLEM',
                'ordering': ['id', 'editor__id'],
            },
        ),
        migrations.CreateModel(
            name='RuleInfo',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='NAME', max_length=30, unique=True, verbose_name='rule name')),
                ('description', models.TextField(db_column='DESCRIPTION', verbose_name='규칙설명')),
                ('type', models.CharField(choices=[('placement', '착수'), ('action', '액션'), ('ending', '엔딩'), ('victory', '승리조건')], db_column='TYPE', max_length=30, verbose_name='규칙종류')),
            ],
            options={
                'verbose_name': '규칙정보',
                'verbose_name_plural': '규칙정보',
                'db_table': 'RULEINFO',
                'ordering': ['id', 'type'],
            },
        ),
        migrations.CreateModel(
            name='UserInformationInProblem',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(db_column='SCORE', default=0, verbose_name='점수')),
                ('tier', models.CharField(db_column='TIRE', default='Bronze', max_length=20, verbose_name='등급')),
                ('code', models.ForeignKey(db_column='CODE', default=1, on_delete=django.db.models.deletion.PROTECT, to='onepanman_api.Code', verbose_name='대표 코드')),
                ('problem', models.ForeignKey(db_column='PROBLEM', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='problem_userInformationInProblem_problem', to='onepanman_api.Problem', verbose_name='문제')),
                ('user', models.ForeignKey(db_column='USER', on_delete=django.db.models.deletion.PROTECT, related_name='user_userInformationInProblem_user', to=settings.AUTH_USER_MODEL, verbose_name='유저')),
            ],
            options={
                'verbose_name': '문제:유저점수정보',
                'verbose_name_plural': '문제:유저점수정보',
                'db_table': 'USERINFORMATIONINPROBLEM',
                'ordering': ['id', 'problem__id', 'score'],
            },
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('user', models.OneToOneField(db_column='USER', on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='user_userInfo_user', serialize=False, to=settings.AUTH_USER_MODEL, verbose_name='유저')),
                ('nickname', models.CharField(db_column='NICKNAME', default='Anonymous', max_length=40, verbose_name='닉네임')),
                ('heart', models.IntegerField(db_column='HEART', default=5, verbose_name='하트')),
                ('isCodeOpen', models.BooleanField(db_column='isCodeOpen', default=False, verbose_name='코드공개여부')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='가입날짜')),
                ('profileImage', models.TextField(db_column='PROFILEIMAGE', default='기본사진경로 넣기', verbose_name='프로필 사진')),
                ('group', models.ForeignKey(blank=True, db_column='GROUP', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='group_userInfo_group', to='auth.Group', verbose_name='그룹')),
                ('language', models.ForeignKey(db_column='LANGUAGE', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='language_userInfo_language', to='onepanman_api.Language', verbose_name='주 사용 언어')),
            ],
            options={
                'verbose_name': '유저 정보',
                'verbose_name_plural': '유저 정보',
                'db_table': 'USERINFO',
                'ordering': ['user'],
            },
        ),
        migrations.CreateModel(
            name='Testcase',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('testcase_index', models.IntegerField(db_column='TESTCASE_INDEX', verbose_name='TestCase 번호')),
                ('testcase', models.TextField(db_column='TESTCASE', verbose_name='TestCase')),
                ('problem', models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_testcase_problem', to='onepanman_api.Problem')),
            ],
            options={
                'verbose_name': '테스트케이스',
                'verbose_name_plural': '테스트케이스',
                'db_table': 'TESTCASE',
                'ordering': ['id', 'problem__id'],
            },
        ),
        migrations.CreateModel(
            name='Notice',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_column='TITLE', max_length=50, verbose_name='제목')),
                ('content', models.TextField(db_column='CONTENT', verbose_name='내용')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='작성시간')),
                ('isRead', models.BooleanField(db_column='isREAD', default=False, verbose_name='읽음여부')),
                ('receiver', models.ForeignKey(db_column='RECEIVER', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='user_notice_receiver', to=settings.AUTH_USER_MODEL, verbose_name='수신자')),
                ('sender', models.ForeignKey(db_column='SENDER', default=1, on_delete=django.db.models.deletion.PROTECT, related_name='user_notice_sender', to=settings.AUTH_USER_MODEL, verbose_name='발신자')),
            ],
            options={
                'verbose_name': '알림정보',
                'verbose_name_plural': '알림정보',
                'db_table': 'NOTICE',
                'ordering': ['id', 'date'],
            },
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('record', models.TextField(db_column='RECORD', verbose_name='게임기록')),
                ('winner', models.IntegerField(db_column='WINNER', default=0, verbose_name='승리자')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='대전 시각')),
                ('challenger', models.ForeignKey(db_column='CHALLENGER', on_delete=django.db.models.deletion.PROTECT, related_name='user_game_challenger', to=settings.AUTH_USER_MODEL)),
                ('challenger_code', models.ForeignKey(db_column='CHALLENGER_CODE', on_delete=django.db.models.deletion.PROTECT, related_name='code_game_challenger_code', to='onepanman_api.Code', verbose_name='도전자코드')),
                ('opposite', models.ForeignKey(db_column='OPPOSITE', on_delete=django.db.models.deletion.PROTECT, related_name='user_game_opposite', to=settings.AUTH_USER_MODEL)),
                ('opposite_code', models.ForeignKey(db_column='OPPOSITE_CODE', on_delete=django.db.models.deletion.PROTECT, related_name='code_game_opposite_code', to='onepanman_api.Code', verbose_name='상대방코드')),
                ('problem', models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_game_problem', to='onepanman_api.Problem')),
            ],
            options={
                'verbose_name': '게임정보',
                'verbose_name_plural': '게임정보',
                'db_table': 'GAME',
                'ordering': ['id', 'problem__id', '-date'],
            },
        ),
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('isAccept', models.BooleanField(db_column='isAccept', default=False, verbose_name='수락여부')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', verbose_name='신청/수락 날짜')),
                ('user1', models.ForeignKey(db_column='USER1', on_delete=django.db.models.deletion.CASCADE, related_name='user_friend_user1', to=settings.AUTH_USER_MODEL, verbose_name='유저 1')),
                ('user2', models.ForeignKey(db_column='USER2', on_delete=django.db.models.deletion.CASCADE, related_name='user_friend_user2', to=settings.AUTH_USER_MODEL, verbose_name='유저 2')),
            ],
            options={
                'verbose_name': '친구정보',
                'verbose_name_plural': '친구정보',
                'db_table': 'FRIEND',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(db_column='ID', primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_index', models.IntegerField(db_column='COMMENT_INDEX', default=1, verbose_name='댓글 번호')),
                ('comment', models.TextField(db_column='COMMENT', default=' ', verbose_name='댓글')),
                ('like', models.IntegerField(db_column='LIKE', default=0, verbose_name='추천수')),
                ('hate', models.IntegerField(db_column='HATE', default=0, verbose_name='비추천수')),
                ('date', models.DateTimeField(auto_now_add=True, db_column='DATE', null=True, verbose_name='작성시간')),
                ('article', models.ForeignKey(db_column='ARTICLE', on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='onepanman_api.Article', verbose_name='게시글')),
                ('author', models.ForeignKey(db_column='AUTHOR', on_delete=django.db.models.deletion.CASCADE, related_name='user_comment_author', to=settings.AUTH_USER_MODEL, verbose_name='작성자')),
            ],
            options={
                'verbose_name': '댓글 정보',
                'verbose_name_plural': '댓글 정보',
                'db_table': 'COMMENT',
                'ordering': ['id', 'article__id', 'comment_index'],
            },
        ),
        migrations.AddField(
            model_name='code',
            name='language',
            field=models.ForeignKey(db_column='LANGUAGE', on_delete=django.db.models.deletion.PROTECT, related_name='language_code_language', to='onepanman_api.Language', verbose_name='언어'),
        ),
        migrations.AddField(
            model_name='code',
            name='problem',
            field=models.ForeignKey(db_column='PROBLEM', on_delete=django.db.models.deletion.PROTECT, related_name='problem_code_problem', to='onepanman_api.Problem', verbose_name='문제'),
        ),
    ]

# Generated by Django 2.2.10 on 2020-02-21 10:02