Initial working version with minor bugs

This commit is contained in:
badblocks 2025-02-26 00:06:42 -08:00
parent f946e4933a
commit 71b3993326
83 changed files with 34485 additions and 173 deletions

13
friend_codes/models.py Normal file
View file

@ -0,0 +1,13 @@
from django.db import models
from django.conf import settings
from accounts.models import CustomUser
class FriendCode(models.Model):
id = models.AutoField(primary_key=True)
friend_code = models.CharField(max_length=19)
user = models.ForeignKey("accounts.CustomUser", on_delete=models.PROTECT, related_name='friend_codes')
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self):
return self.friend_code