Ejemplo n.º 1
0
class Job(sqlobject.SQLObject):
    job_id = sqlobject.StringCol()
    vault_name = sqlobject.StringCol(length=20, default=None)
    action = sqlobject.StringCol(length=20, default="")
    creation_date = sqlobject.DateCol(default=None)
    has_completed = sqlobject.BoolCol(default=False)
    completion_date = sqlobject.DateCol(default=None)
    status_code = sqlobject.StringCol(length=10, default="")
    response_text = sqlobject.StringCol()
Ejemplo n.º 2
0
class Product(sqlobject.SQLObject):
    _connection = establish_connection()
    productName = sqlobject.StringCol(length=100)
    energyPoints = sqlobject.IntCol(default=None)
    date = sqlobject.DateCol()

    def __repr__(self):
        return "date: {} name = {}, energy = {}".format(self.date,\
                                                self.productName, self.energyPoints)
Ejemplo n.º 3
0
class Source(so.SQLObject):
    """
    Model a datasource of exported or manually created webpage data.
    """

    # Creation date of source. This could be the last day that a source
    # was used and that could be related to moving away from using a device
    # or exporting data from a company computer before leaving a job.
    date_created = so.DateCol(notNull=True)
    date_created_idx = so.DatabaseIndex(date_created)

    # The format of the datasource.
    format_ = so.ForeignKey('Format', notNull=True)

    # The web browser where the data originated.
    browser = so.ForeignKey('Browser')

    # The location where one lived and worked when creating the datasource.
    location = so.ForeignKey('Location')

    # True if it was work related, false if it was personal.
    is_work = so.BoolCol(notNull=True)
Ejemplo n.º 4
0
class Web_services(sqlobject.SQLObject):
    endpoint = sqlobject.StringCol(length=250)
    name = sqlobject.StringCol(length=30)
    keywords = sqlobject.StringCol()
    datekeyword = sqlobject.DateCol()
Ejemplo n.º 5
0
class EventObject(sqlobject.SQLObject):

    name = sqlobject.StringCol(alternateID=True)
    date = sqlobject.DateCol(notNull=True)
    description = sqlobject.StringCol()