14 lines
326 B
Python
14 lines
326 B
Python
from django.db import models
|
|
|
|
|
|
class Score(models.Model):
|
|
username = models.CharField(max_length=100)
|
|
points = models.IntegerField()
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
|
|
class Meta:
|
|
ordering = ["-points"]
|
|
|
|
def __str__(self) -> str:
|
|
return f"{self.username}: {self.points}"
|