/
home
/
liman
/
liman-backend
/
conversation
/
File Upload :
llllll
Current File: //home/liman/liman-backend/conversation/models.py
from audioop import max from django.db import models from limanAuth.models import Customer, Porter # Create your models here. class Conversation(models.Model): SELECT = ["creator__first_name", "creator__last_name", 'creator__mobile', 'user__first_name', 'user__last_name', 'user__mobile'] id = models.AutoField(primary_key=True) creator = models.ForeignKey('limanAuth.User', on_delete=models.CASCADE, related_name='self_conversation') topic = models.CharField(null=True, blank=True, max_length=128) description = models.CharField(null=True, blank=True, max_length=512) type = models.SmallIntegerField(choices=[(1, 'Presence'), (2, 'Telephone'), (3, 'Chat')], default=1) user = models.ForeignKey('limanAuth.User', on_delete=models.CASCADE, related_name='for_conversation') score = models.SmallIntegerField(default=0) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Reminder(models.Model): id = models.AutoField(primary_key=True) title = models.CharField(max_length=128) date = models.DateTimeField() type = models.SmallIntegerField(default=1, choices=[ (1, 'without repeat'), (2, 'daily'), (3, 'weekly'), (4, 'monthly'), (5, 'yearly'), ]) end_date = models.DateTimeField(null=True, blank=True) count_limit = models.SmallIntegerField(null=True, blank=True) count = models.SmallIntegerField(default=0) conversation = models.ForeignKey(Conversation, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)
Copyright ©2k19 -
Hexid
|
Tex7ure