first commit
This commit is contained in:
23
Client/models.py
Normal file
23
Client/models.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from django.db import models
|
||||
from Base.models import Professional , Base
|
||||
|
||||
# Lista de clientes
|
||||
class Client(Base):
|
||||
first_name = models.CharField(max_length=100)
|
||||
last_name = models.CharField(max_length=500)
|
||||
phone = models.DecimalField(max_digits=20,decimal_places=0)
|
||||
professional = models.ForeignKey(
|
||||
Professional,
|
||||
on_delete=models.PROTECT,
|
||||
related_name='ClientProfessional'
|
||||
)
|
||||
double_workload = models.BooleanField(default=False)
|
||||
feed_back = models.BooleanField(default=False)
|
||||
msg_3_months = models.BooleanField(default=False)
|
||||
msg_6_months = models.BooleanField(default=False)
|
||||
msg_12_months = models.BooleanField(default=False)
|
||||
notes = models.TextField(null=True, blank=True)
|
||||
class Meta:
|
||||
ordering = ['first_name','last_name']
|
||||
def __str__(self):
|
||||
return f'{self.first_name} {self.last_name} {self.professional.symbol}'
|
||||
Reference in New Issue
Block a user