-
Notifications
You must be signed in to change notification settings - Fork 3
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
sejokim
committed
Mar 30, 2024
1 parent
34d9e53
commit b784c95
Showing
8 changed files
with
287 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 4.2.10 on 2024-03-30 10:44 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Friend', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('status', models.PositiveSmallIntegerField(choices=[(0, '대기'), (1, '수락'), (2, '거절')], default=0)), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('updated_at', models.DateTimeField(auto_now=True)), | ||
], | ||
options={ | ||
'db_table': 'friends', | ||
}, | ||
), | ||
] |
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,32 @@ | ||
# Generated by Django 4.2.10 on 2024-03-30 10:44 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('friends', '0001_initial'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='friend', | ||
name='friend_id', | ||
field=models.ForeignKey(db_column='friend_id', on_delete=django.db.models.deletion.PROTECT, related_name='friend_who_is_requested', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='friend', | ||
name='user_id', | ||
field=models.ForeignKey(db_column='user_id', on_delete=django.db.models.deletion.PROTECT, related_name='user_who_is_requesting', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='friend', | ||
unique_together={('user_id', 'friend_id')}, | ||
), | ||
] |
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,89 @@ | ||
# Generated by Django 4.2.10 on 2024-03-30 10:44 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CasualGameListView', | ||
fields=[ | ||
('game_id', models.IntegerField(primary_key=True, serialize=False)), | ||
('mode', models.PositiveSmallIntegerField()), | ||
('status', models.PositiveSmallIntegerField()), | ||
], | ||
options={ | ||
'db_table': 'casual_game_list_view', | ||
'managed': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='CasualGameView', | ||
fields=[ | ||
('game_id', models.IntegerField(primary_key=True, serialize=False)), | ||
('mode', models.PositiveSmallIntegerField()), | ||
], | ||
options={ | ||
'db_table': 'casual_game_view', | ||
'managed': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='GameRecordView', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('game_id', models.IntegerField()), | ||
('mode', models.IntegerField()), | ||
('user_id', models.IntegerField()), | ||
('started_at', models.DateTimeField(auto_now_add=True)), | ||
], | ||
options={ | ||
'db_table': 'game_record_view', | ||
'managed': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='RankGameView', | ||
fields=[ | ||
('game_id', models.IntegerField(primary_key=True, serialize=False)), | ||
], | ||
options={ | ||
'db_table': 'rank_game_view', | ||
'managed': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Game', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('mode', models.PositiveSmallIntegerField(choices=[(0, 'casual_1vs1'), (1, 'casual_tournament'), (2, 'rank')])), | ||
('title', models.CharField(blank=True, null=True)), | ||
('password', models.CharField(blank=True, null=True)), | ||
('status', models.PositiveSmallIntegerField(choices=[(0, 'AVAILABLE_WAITING'), (1, 'FULL_WAITING'), (2, 'IN_GAME'), (3, 'FINISHED'), (4, 'DELETED')])), | ||
('created_at', models.DateTimeField(auto_now_add=True)), | ||
('started_at', models.DateTimeField(blank=True, null=True)), | ||
], | ||
options={ | ||
'db_table': 'games', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Result', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('player1_score', models.PositiveSmallIntegerField(blank=True, null=True)), | ||
('player2_score', models.PositiveSmallIntegerField(blank=True, null=True)), | ||
('started_at', models.DateTimeField(blank=True, null=True)), | ||
('playtime', models.TimeField(blank=True, null=True)), | ||
], | ||
options={ | ||
'db_table': 'results', | ||
}, | ||
), | ||
] |
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,68 @@ | ||
# Generated by Django 4.2.10 on 2024-03-30 10:44 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('games', '0001_initial'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='result', | ||
name='player1', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='result_player1', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='result', | ||
name='player2', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='result_player2', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='result', | ||
name='winner', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='manager', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='match1', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='result_match1', to='games.result'), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='match2', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='result_match2', to='games.result'), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='match3', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='result_match3', to='games.result'), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='player1', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player1_id', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='player2', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player2_id', to=settings.AUTH_USER_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='game', | ||
name='player3', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player3_id', 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
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,39 @@ | ||
# Generated by Django 4.2.10 on 2024-03-30 10:44 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('auth', '0012_alter_user_first_name_max_length'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='User', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), | ||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), | ||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), | ||
('email', models.EmailField(max_length=254, unique=True, verbose_name='이메일 주소')), | ||
('nickname', models.CharField(blank=True, max_length=8, null=True, unique=True)), | ||
('rating', models.PositiveIntegerField(default=0)), | ||
('avatar', models.ImageField(null=True, upload_to='avatar/')), | ||
('verification_code', models.CharField(blank=True, max_length=6, null=True)), | ||
('is_online', models.BooleanField(default=False)), | ||
('custom_1vs1_wins', models.IntegerField(default=0)), | ||
('custom_tournament_wins', models.IntegerField(default=0)), | ||
('rank_wins', models.IntegerField(default=0)), | ||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')), | ||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')), | ||
], | ||
options={ | ||
'db_table': 'users', | ||
}, | ||
), | ||
] |
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