-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
615 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ htmlcov/ | |
.cache | ||
nosetests.xml | ||
coverage.xml | ||
migrations/* | ||
# Translations | ||
*.mo | ||
# Mr Developer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 15:30 | ||
|
||
import account.models | ||
from django.conf import settings | ||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='User', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('password', models.CharField(max_length=128, verbose_name='password')), | ||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), | ||
('username', models.TextField(unique=True)), | ||
('realname', models.TextField(null=True)), | ||
('email', models.TextField(null=True)), | ||
('create_time', models.DateTimeField(auto_now_add=True, null=True)), | ||
('schoolssn', models.IntegerField(default=0)), | ||
('admin_type', models.TextField(default='Regular User')), | ||
('problem_permission', models.TextField(default='None')), | ||
('reset_password_token', models.TextField(null=True)), | ||
('reset_password_token_expire_time', models.DateTimeField(null=True)), | ||
('auth_token', models.TextField(null=True)), | ||
('two_factor_auth', models.BooleanField(default=False)), | ||
('tfa_token', models.TextField(null=True)), | ||
('session_keys', django.contrib.postgres.fields.jsonb.JSONField(default=list)), | ||
('open_api', models.BooleanField(default=False)), | ||
('open_api_appkey', models.TextField(null=True)), | ||
('is_disabled', models.BooleanField(default=False)), | ||
('is_allowed', models.BooleanField(default=False)), | ||
], | ||
options={ | ||
'db_table': 'user', | ||
}, | ||
managers=[ | ||
('objects', account.models.UserManager()), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='UserProfile', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('acm_problems_status', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), | ||
('oi_problems_status', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), | ||
('real_name', models.TextField(null=True)), | ||
('avatar', models.TextField(default='/public/avatar/default.png')), | ||
('blog', models.URLField(null=True)), | ||
('mood', models.TextField(null=True)), | ||
('github', models.TextField(null=True)), | ||
('school', models.TextField(null=True)), | ||
('major', models.TextField(null=True)), | ||
('language', models.TextField(null=True)), | ||
('accepted_number', models.IntegerField(default=0)), | ||
('total_score', models.BigIntegerField(default=0)), | ||
('submission_number', models.IntegerField(default=0)), | ||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'user_profile', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 15:30 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import utils.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Announcement', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.TextField()), | ||
('content', utils.models.RichTextField()), | ||
('create_time', models.DateTimeField(auto_now_add=True)), | ||
('last_update_time', models.DateTimeField(auto_now=True)), | ||
('visible', models.BooleanField(default=True)), | ||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'announcement', | ||
'ordering': ('-create_time',), | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 15:30 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='JudgeServer', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('hostname', models.TextField()), | ||
('ip', models.TextField(null=True)), | ||
('judger_version', models.TextField()), | ||
('cpu_core', models.IntegerField()), | ||
('memory_usage', models.FloatField()), | ||
('cpu_usage', models.FloatField()), | ||
('last_heartbeat', models.DateTimeField()), | ||
('create_time', models.DateTimeField(auto_now_add=True)), | ||
('task_number', models.IntegerField(default=0)), | ||
('service_url', models.TextField(null=True)), | ||
('is_disabled', models.BooleanField(default=False)), | ||
], | ||
options={ | ||
'db_table': 'judge_server', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 15:30 | ||
|
||
from django.conf import settings | ||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import utils.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('lecture', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Contest', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.TextField()), | ||
('description', utils.models.RichTextField()), | ||
('real_time_rank', models.BooleanField()), | ||
('password', models.TextField(null=True)), | ||
('lecture_contest_type', models.TextField(default='실습')), | ||
('rule_type', models.TextField()), | ||
('start_time', models.DateTimeField()), | ||
('end_time', models.DateTimeField()), | ||
('create_time', models.DateTimeField(auto_now_add=True)), | ||
('last_update_time', models.DateTimeField(auto_now=True)), | ||
('visible', models.BooleanField(default=True)), | ||
('allowed_ip_ranges', django.contrib.postgres.fields.jsonb.JSONField(default=list)), | ||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
('lecture', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='lecture.Lecture')), | ||
], | ||
options={ | ||
'db_table': 'contest', | ||
'ordering': ('-start_time',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ContestAnnouncement', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.TextField()), | ||
('content', utils.models.RichTextField()), | ||
('visible', models.BooleanField(default=True)), | ||
('create_time', models.DateTimeField(auto_now_add=True)), | ||
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')), | ||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'contest_announcement', | ||
'ordering': ('-create_time',), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='OIContestRank', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('submission_number', models.IntegerField(default=0)), | ||
('total_score', models.IntegerField(default=0)), | ||
('submission_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), | ||
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'oi_contest_rank', | ||
'unique_together': {('user', 'contest')}, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ACMContestRank', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('submission_number', models.IntegerField(default=0)), | ||
('accepted_number', models.IntegerField(default=0)), | ||
('total_time', models.IntegerField(default=0)), | ||
('submission_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), | ||
('contest', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contest.Contest')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'acm_contest_rank', | ||
'unique_together': {('user', 'contest')}, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.16 on 2020-09-22 15:35 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contest', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='contest', | ||
name='private', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 15:30 | ||
|
||
from django.conf import settings | ||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import utils.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Lecture', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.TextField()), | ||
('description', utils.models.RichTextField()), | ||
('year', models.IntegerField()), | ||
('semester', models.IntegerField()), | ||
('status', models.BooleanField()), | ||
('password', models.TextField()), | ||
('isapply', models.BooleanField(default=False)), | ||
('isallow', models.BooleanField(default=False)), | ||
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'db_table': 'lecture', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ta_admin_class', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('realname', models.TextField(default=None, null=True)), | ||
('schoolssn', models.IntegerField(default=None, null=True)), | ||
('lecture_isallow', models.BooleanField(default=False)), | ||
('code_isallow', models.BooleanField(default=False)), | ||
('score_isallow', models.BooleanField(default=False)), | ||
('lecture', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lecture.Lecture')), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='signup_class', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('status', models.BooleanField(default=False)), | ||
('isallow', models.BooleanField(default=False)), | ||
('realname', models.TextField(default=None, null=True)), | ||
('schoolssn', models.IntegerField(default=None, null=True)), | ||
('score', django.contrib.postgres.fields.jsonb.JSONField(default=dict)), | ||
('etc', models.TextField(null=True)), | ||
('lecture', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='lecture.Lecture')), | ||
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 16:18 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contest', '0001_initial'), | ||
('lecture', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='signup_class', | ||
name='contest', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='contest.Contest'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.2.16 on 2020-09-21 16:30 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('lecture', '0002_signup_class_contest'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='signup_class', | ||
name='lecture', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='lecture.Lecture'), | ||
), | ||
] |
Oops, something went wrong.