enums.py 778 Bytes
class Table:
  id = "id"
  path = "path"
  serv = "serv"
  dest = "dest"
  type = "type"
  info = "info"
  state = "state"
  chrome_service = "chrome_service"

  @staticmethod
  def validate(column):
    return hasattr(Table, column)

class States:
  queued = "queued"
  delivered = "delivered"
  preprocess = "preprocess"
  partial = "partially delivered"

  @staticmethod
  def validate(state):
    return hasattr(States, state)

class Services:
  wpp1 = "wpp1"
  mail = "mail"
  sms = "sms"


  @staticmethod
  def validate(serv):
    return hasattr(Services, serv)

class Datatypes:
  text = "text"
  image = "image"
  document = "document"
  link = "link"
  audio = "audio"
  html = "html"

  @staticmethod
  def validate(datatype):
    return hasattr(Datatypes, datatype)