-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_tickets.py
29 lines (23 loc) · 1.37 KB
/
model_tickets.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from .base import Base
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean
from .model_messages import ModelMessages
from sqlalchemy.orm import relationship
def node_default(context):
return context.get_current_parameters()['phone_id']
class ModelTickets(Base):
"""Tickets model."""
__tablename__ = 'Tickets'
id = Column('id', Integer, primary_key=True, doc=" unique Id of the ticket.")
idTk = Column('idTk', String(50), doc="Id of the ticket")
idCode = Column('idCode', String(50), default=0, doc="Id of the destination phone.")
node2 = Column('node2', String(15), default='', doc="Entity")
node3 = Column('node3', String(15), default='', doc="area")
node4 = Column('node4', String(15), default='', doc="account")
phone = Column('phone', String(15), doc="Phone number of the contact_class what do some entry")
name = Column('name', String(30), doc="name of the contact_class what do some entry")
image = Column('image', String(200), doc="Link of the contact_class profile picture ")
count = Column('count', Integer, default=1, doc="keep te count of activity")
lastIdMsg = Column('lastIdMsg', String(100), doc="last message id")
readed = Column('readed', Boolean, default = False )
timestamp = Column('timestamp', String(20), doc="Record timestamp.")
listMessage = relationship(ModelMessages, backref="Tickets")