Finish supervisor , 残りはExcelとセキュリティ.

This commit is contained in:
hayano
2024-11-02 23:53:34 +00:00
parent 82d0e55945
commit c6969d7afa
7 changed files with 742 additions and 82 deletions

View File

@ -522,6 +522,11 @@ class GoalImages(models.Model):
team_name = models.CharField(_("Team name"), max_length=255)
event_code = models.CharField(_("event code"), max_length=255)
cp_number = models.IntegerField(_("CP numner"))
zekken_number = models.TextField(
null=True, # False にする
blank=True, # False にする
help_text="ゼッケン番号"
)
class CheckinImages(models.Model):
user=models.ForeignKey(CustomUser, on_delete=models.DO_NOTHING)
@ -532,6 +537,7 @@ class CheckinImages(models.Model):
cp_number = models.IntegerField(_("CP numner"))
class GpsCheckin(models.Model):
id = models.AutoField(primary_key=True) # 明示的にidフィールドを追加
path_order = models.IntegerField(
null=False,
help_text="チェックポイントの順序番号"
@ -637,7 +643,7 @@ class GpsCheckin(models.Model):
]
def __str__(self):
return f"{self.event_code}-{self.zekken_number}-{self.path_order}"
return f"{self.event_code}-{self.zekken_number}-{self.path_order}-buy:{self.buy_flag}-valid:{self.validate_location}-point:{self.points}"
def save(self, *args, **kwargs):
# 作成時・更新時のタイムスタンプを自動設定