from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse

class Message(models.Model):
    sender = models.ForeignKey(User, on_delete=models.CASCADE, related_name='messages_sent')
    receiver = models.ForeignKey(User, on_delete=models.CASCADE, related_name='messages_received')
    content = models.TextField(max_length=300)
    date_of_create = models.DateField(auto_now=True)
