from django.db import models
from core import models as core_models


class Review(core_models.TimeStampedModel):
    """ Review Model Defination """

    review = models.TextField()
    accuracy = models.IntegerField()
    communication = models.IntegerField()
    location = models.IntegerField()
    cleanliness = models.IntegerField()
    check_in = models.IntegerField()
    value = models.IntegerField()
    user = models.ForeignKey("users.User", on_delete=models.CASCADE)
    room = models.ForeignKey("rooms.Room", on_delete=models.CASCADE)

    def __str__(self):
        # return self.room.name
        return self.review

from django.db import models
from core import models as core_models


class Review(core_models.TimeStampedModel):
    """ Review Model Defination """

    review = models.TextField()
    accuracy = models.IntegerField()
    communication = models.IntegerField()
    location = models.IntegerField()
    cleanliness = models.IntegerField()
    check_in = models.IntegerField()
    value = models.IntegerField()
    user = models.ForeignKey("users.User", on_delete=models.CASCADE)
    room = models.ForeignKey("rooms.Room", on_delete=models.CASCADE)

    def __str__(self):
        # return self.room.name
        return self.review

Review Model Defination # return self.room.name