forked from Kamva-Academy/Kamva-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init PlayerTransition model and sync it with PlayerStateHistory
- Loading branch information
1 parent
02ea58f
commit 7cfdf9c
Showing
16 changed files
with
284 additions
and
52 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
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
34 changes: 34 additions & 0 deletions
34
...4_rename_is_edge_passed_in_reverse_playerhistory_is_edge_transited_in_reverse_and_more.py
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 4.1.3 on 2024-05-13 12:21 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0113_rename_entered_by_edge_playerhistory_passed_edge_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='playerhistory', | ||
old_name='is_edge_passed_in_reverse', | ||
new_name='is_edge_transited_in_reverse', | ||
), | ||
migrations.RenameField( | ||
model_name='playerhistory', | ||
old_name='passed_edge', | ||
new_name='transited_edge', | ||
), | ||
migrations.AddField( | ||
model_name='playerhistory', | ||
name='source_state', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='source_of_players_transitions', to='fsm.state'), | ||
), | ||
migrations.AlterField( | ||
model_name='playerhistory', | ||
name='state', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='target_of_players_transitions', to='fsm.state'), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
apps/fsm/migrations/0115_rename_state_playerhistory_target_state.py
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 4.1.3 on 2024-05-13 12:21 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0114_rename_is_edge_passed_in_reverse_playerhistory_is_edge_transited_in_reverse_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='playerhistory', | ||
old_name='state', | ||
new_name='target_state', | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
apps/fsm/migrations/0116_alter_playerhistory_is_edge_transited_in_reverse.py
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 4.1.3 on 2024-05-13 13:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0115_rename_state_playerhistory_target_state'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='playerhistory', | ||
name='is_edge_transited_in_reverse', | ||
field=models.BooleanField(blank=True, null=True), | ||
), | ||
] |
22 changes: 22 additions & 0 deletions
22
apps/fsm/migrations/0117_rename_target_state_playerhistory_state_and_more.py
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,22 @@ | ||
# Generated by Django 4.1.3 on 2024-05-13 13:46 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0116_alter_playerhistory_is_edge_transited_in_reverse'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='playerhistory', | ||
old_name='target_state', | ||
new_name='state', | ||
), | ||
migrations.RemoveField( | ||
model_name='playerhistory', | ||
name='source_state', | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
apps/fsm/migrations/0118_rename_playerhistory_playerstatehistory.py
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,17 @@ | ||
# Generated by Django 4.1.3 on 2024-05-13 13:48 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0117_rename_target_state_playerhistory_state_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='PlayerHistory', | ||
new_name='PlayerStateHistory', | ||
), | ||
] |
34 changes: 34 additions & 0 deletions
34
apps/fsm/migrations/0119_alter_playerstatehistory_end_time_and_more.py
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 4.1.3 on 2024-05-13 13:57 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0118_rename_playerhistory_playerstatehistory'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='playerstatehistory', | ||
name='end_time', | ||
field=models.DateTimeField(null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='playerstatehistory', | ||
name='start_time', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
migrations.AlterField( | ||
model_name='playerstatehistory', | ||
name='state', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player_state_histories', to='fsm.state'), | ||
), | ||
migrations.AlterField( | ||
model_name='playerstatehistory', | ||
name='transited_edge', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player_histories', to='fsm.edge'), | ||
), | ||
] |
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,25 @@ | ||
# Generated by Django 4.1.3 on 2024-05-13 13:57 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0119_alter_playerstatehistory_end_time_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PlayerTransitionHistory', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('time', models.DateTimeField(auto_now=True)), | ||
('is_edge_transited_in_reverse', models.BooleanField(blank=True, null=True)), | ||
('source_state', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='source_of_player_transitions', to='fsm.state')), | ||
('target_state', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='target_of_player_transitions', to='fsm.state')), | ||
('transited_edge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='player_transition_histories', to='fsm.edge')), | ||
], | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
apps/fsm/migrations/0121_rename_start_time_playerstatehistory_arrival_time_and_more.py
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,23 @@ | ||
# Generated by Django 4.1.3 on 2024-05-13 14:02 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0120_playertransitionhistory'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='playerstatehistory', | ||
old_name='start_time', | ||
new_name='arrival_time', | ||
), | ||
migrations.RenameField( | ||
model_name='playerstatehistory', | ||
old_name='end_time', | ||
new_name='departure_time', | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
apps/fsm/migrations/0122_rename_playertransitionhistory_playertransition_and_more.py
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,28 @@ | ||
# Generated by Django 4.1.3 on 2024-05-13 14:15 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fsm', '0121_rename_start_time_playerstatehistory_arrival_time_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='PlayerTransitionHistory', | ||
new_name='PlayerTransition', | ||
), | ||
migrations.AddField( | ||
model_name='playerstatehistory', | ||
name='arrival', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='state_arrival_history', to='fsm.playertransition'), | ||
), | ||
migrations.AddField( | ||
model_name='playerstatehistory', | ||
name='departure', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='state_departure_history', to='fsm.playertransition'), | ||
), | ||
] |
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
Oops, something went wrong.