Esempio n. 1
0
    def insert_data(self, raw_data):

        uid = tools.get_uuid()
        try:
            CabPostHist.create(
                uid=uid,
                title=raw_data.title,
                date=raw_data.date,
                post_id=raw_data.uid,
                time_create=raw_data.time_create,
                user_name=raw_data.user_name,
                cnt_md=raw_data.cnt_md,
                time_update=raw_data.time_update,
                id_spec=raw_data.id_spec,
                logo=raw_data.logo,
            )
            return (uid)
        except:
            return False
Esempio n. 2
0
    def insert_data(self, raw_data):

        uid = tools.get_uuid()
        try:
            CabPostHist.create(
                uid=uid,
                title=raw_data.title,
                date=raw_data.date,
                post_id=raw_data.uid,
                time_create=raw_data.time_create,
                user_name=raw_data.user_name,
                cnt_md=raw_data.cnt_md,
                time_update=raw_data.time_update,
                id_spec=raw_data.id_spec,
                logo=raw_data.logo,
            )
            return (uid)
        except:
            return False
Esempio n. 3
0
 def insert_data(self, raw_data):
     print('============')
     print(raw_data.uid)
     print('--------------')
     uid = str(uuid.uuid1())
     entry = CabPostHist.create(
         uid=uid,
         title=raw_data.title,
         date=raw_data.date,
         post_id=raw_data.uid,
         time_create=raw_data.time_create,
         user_name=raw_data.user_name,
         cnt_md=raw_data.cnt_md,
         time_update=raw_data.time_update,
         id_spec=raw_data.id_spec,
         logo=raw_data.logo,
     )
     return (uid)
Esempio n. 4
0
 def insert_data(self, raw_data):
     print('============')
     print(raw_data.uid)
     print('--------------')
     uid = str(uuid.uuid1())
     entry = CabPostHist.create(
         uid=uid,
         title=raw_data.title,
         date=raw_data.date,
         post_id=raw_data.uid,
         time_create=raw_data.time_create,
         user_name=raw_data.user_name,
         cnt_md=raw_data.cnt_md,
         time_update=raw_data.time_update,
         id_spec=raw_data.id_spec,
         logo=raw_data.logo,
     )
     return (uid)
Esempio n. 5
0
 def query_all(self):
     return CabPostHist.select().order_by('time_update')
Esempio n. 6
0
 def get_by_id(self, in_uid):
     tt = CabPostHist.get(CabPostHist.uid == in_uid)
     return tt
Esempio n. 7
0
 def __init__(self):
     try:
         CabPostHist.create_table()
     except:
         pass
Esempio n. 8
0
 def query_all(self):
     return CabPostHist.select().order_by('time_update')
Esempio n. 9
0
 def get_by_id(self, in_uid):
     tt = CabPostHist.get(CabPostHist.uid == in_uid)
     return tt
Esempio n. 10
0
 def __init__(self):
     try:
         CabPostHist.create_table()
     except:
         pass