[chronojump-server] Minor changes
- From: Max Ros i Morejon <maxros src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Minor changes
- Date: Mon, 12 Nov 2018 11:26:09 +0000 (UTC)
commit 30af2dc36466a54e31e48c4db7e9d220ab895d64
Author: Max Ros i Morejon <mros33 gmail com>
Date: Sun Oct 28 09:45:54 2018 +0100
Minor changes
.../chronojump_networks/organizations/models.py | 50 ++++++++++++++-------
diagrams/networks.dia | Bin 4645 -> 4641 bytes
2 files changed, 33 insertions(+), 17 deletions(-)
---
diff --git a/chronojumpserver-django/chronojump_networks/organizations/models.py
b/chronojumpserver-django/chronojump_networks/organizations/models.py
index 2b0fe8a..3b21bc4 100644
--- a/chronojumpserver-django/chronojump_networks/organizations/models.py
+++ b/chronojumpserver-django/chronojump_networks/organizations/models.py
@@ -104,7 +104,8 @@ class Organization(ChronojumpBaseModel):
on_delete=models.SET_NULL,
blank=True,
null=True,
- related_name='responsible_of')
+ related_name='responsible_of',
+ db_column='responsibleId')
class OrganizationStaff(models.Model):
@@ -125,10 +126,13 @@ class OrganizationStaff(models.Model):
user = models.OneToOneField(User,
on_delete=models.CASCADE,
- related_name='member_of')
+ related_name='member_of',
+ db_column='userId')
+
organization = models.ForeignKey(Organization,
on_delete=models.CASCADE,
- related_name='staff')
+ related_name='staff',
+ db_column='organizationId')
role = models.IntegerField(choices=ROLE_CHOICES)
@@ -145,16 +149,15 @@ class Gym(ChronojumpBaseModel):
organization = models.ForeignKey(Organization,
on_delete=models.CASCADE,
- related_name='gyms')
+ related_name='gyms',
+ db_column='organizationId')
responsible = models.ForeignKey(User,
on_delete=models.SET_NULL,
blank=True,
null=True,
- related_name='responsible_of_gym')
-
-
-
+ related_name='responsible_of_gym',
+ db_column='responsibleId')
class Station(ChronojumpBaseModel):
@@ -175,7 +178,9 @@ class Station(ChronojumpBaseModel):
gym = models.ForeignKey(Gym,
on_delete=models.CASCADE,
- related_name='stations')
+ related_name='stations',
+ db_column='gymId')
+
type = models.CharField(max_length=1, choices = STATION_CHOICES)
def organization(self):
@@ -189,7 +194,8 @@ class Exercise(ChronojumpBaseModel):
station = models.ForeignKey(Station,
on_delete=models.CASCADE,
- related_name='exercises')
+ related_name='exercises',
+ db_column='stationId')
percentBodyMassDisplaced = models.FloatField(null=True, default=0)
@@ -201,7 +207,8 @@ class Player(ChronojumpBaseModel):
organization = models.ForeignKey(Organization,
on_delete=models.CASCADE,
- related_name='players')
+ related_name='players',
+ db_column='organizationId')
height = models.FloatField(default=0)
weight = models.FloatField(default=0)
@@ -218,16 +225,20 @@ class Group(ChronojumpBaseModel):
organization = models.ForeignKey(Organization,
on_delete = models.CASCADE,
- related_name="groups")
+ related_name="groups",
+ db_column='organizationId')
+
responsible = models.ForeignKey(User,
on_delete=models.SET_NULL,
blank=True,
null=True,
- related_name='groups_responsible')
+ related_name='groups_responsible',
+ db_column='responsibleId')
gym = models.ForeignKey(Gym,
on_delete=models.SET_NULL,
related_name="gym_groups",
+ db_column='gymId',
blank=True,
null=True)
@@ -239,10 +250,13 @@ class GroupCoach(models.Model):
coach = models.ForeignKey(User,
on_delete=models.CASCADE,
- related_name="groups_by_coach")
+ related_name="groups_by_coach",
+ db_column='coachId')
+
group = models.ForeignKey(Group,
on_delete=models.CASCADE,
- related_name="coaches")
+ related_name="coaches",
+ db_column='groupId')
class GroupPlayer(models.Model):
@@ -251,8 +265,10 @@ class GroupPlayer(models.Model):
player = models.ForeignKey(Player,
on_delete=models.CASCADE,
- related_name="groups")
+ related_name="groups",
+ db_column='playerId')
group = models.ForeignKey(Group,
on_delete=models.CASCADE,
- related_name="players")
+ related_name="players",
+ db_column='groupId')
diff --git a/diagrams/networks.dia b/diagrams/networks.dia
index 964f07c..b739824 100644
Binary files a/diagrams/networks.dia and b/diagrams/networks.dia differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]