2020-07-05 18:33:58 +00:00
|
|
|
# Copyright (C) 2020 by Cathy Hu <cathy.hu@fau.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: 0BSD
|
|
|
|
|
|
|
|
from kibicara.model import Hood, Mapping
|
2020-07-06 12:35:20 +00:00
|
|
|
from ormantic import Boolean, Integer, ForeignKey, Model, Text
|
2020-07-05 18:33:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Twitter(Model):
|
|
|
|
id: Integer(primary_key=True) = None
|
|
|
|
hood: ForeignKey(Hood)
|
2020-07-06 09:12:57 +00:00
|
|
|
dms_since_id: Integer(allow_null=True) = None
|
|
|
|
mentions_since_id: Integer(allow_null=True) = None
|
|
|
|
access_token: Text(allow_null=True) = None
|
|
|
|
access_token_secret: Text(allow_null=True) = None
|
2020-07-06 12:35:20 +00:00
|
|
|
successful_verified: Boolean() = False
|
2020-07-05 18:33:58 +00:00
|
|
|
|
|
|
|
class Mapping(Mapping):
|
|
|
|
table_name = 'twitterbots'
|