mower-data-collection/run_order/models.py

20 lines
631 B
Python
Raw Normal View History

2023-12-13 11:58:38 +08:00
from django.db import models
class MowerVersion(models.Model):
version = models.CharField(max_length=40, unique=True)
class AnonymousUser(models.Model):
uuid = models.UUIDField(unique=True)
class RunOrder(models.Model):
SKILL_CHOICES = {"p": "但书", "t": "龙舌兰"}
version = models.ForeignKey(MowerVersion, on_delete=models.CASCADE)
uuid = models.ForeignKey(AnonymousUser, on_delete=models.CASCADE)
time = models.DateTimeField(auto_now_add=True)
facility_level = models.IntegerField()
skill = models.CharField(max_length=1, choices=SKILL_CHOICES)
grandet_mode = models.BooleanField()