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
|
2020-07-06 14:11:05 +00:00
|
|
|
access_token: Text()
|
|
|
|
access_token_secret: Text()
|
2020-08-31 12:08:21 +00:00
|
|
|
username: Text(allow_null=True) = None
|
2020-07-17 21:36:14 +00:00
|
|
|
verified: Boolean() = False
|
|
|
|
enabled: Boolean() = False
|
2020-07-05 18:33:58 +00:00
|
|
|
|
|
|
|
class Mapping(Mapping):
|
|
|
|
table_name = 'twitterbots'
|