StudE-Backend/stude/studygroup_messages/models.py

12 lines
395 B
Python
Raw Normal View History

from django.db import models
from study_groups.models import StudyGroup
# Create your models here.
class Message(models.Model):
user = models.ForeignKey('accounts.CustomUser', on_delete=models.CASCADE)
study_group = models.ForeignKey(StudyGroup, on_delete=models.CASCADE)
message_content = models.TextField(max_length=1024)
2023-06-28 01:18:37 +08:00
timestamp = models.DateTimeField(auto_now_add=True)