FIXUP: rename Video field in Tweet
This commit is contained in:
parent
7db981398c
commit
2086a5e983
@ -1,12 +1,12 @@
|
|||||||
PRAGMA foreign_keys = on;
|
PRAGMA foreign_keys = on;
|
||||||
|
|
||||||
create table users (rowid integer primary key,
|
create table users (rowid integer primary key,
|
||||||
id integer unique not null,
|
id integer unique not null check(typeof(id) = 'integer'),
|
||||||
display_name text not null,
|
display_name text not null,
|
||||||
handle text unique not null,
|
handle text unique not null,
|
||||||
bio text,
|
bio text,
|
||||||
following_count integer not null,
|
following_count integer,
|
||||||
followers_count integer not null,
|
followers_count integer,
|
||||||
location text,
|
location text,
|
||||||
website text,
|
website text,
|
||||||
join_date integer,
|
join_date integer,
|
||||||
@ -14,21 +14,21 @@ create table users (rowid integer primary key,
|
|||||||
is_verified boolean default 0,
|
is_verified boolean default 0,
|
||||||
profile_image_url text,
|
profile_image_url text,
|
||||||
banner_image_url text,
|
banner_image_url text,
|
||||||
pinned_tweet_id integer
|
pinned_tweet_id integer check(typeof(pinned_tweet_id) = 'integer' or pinned_tweet_id = '')
|
||||||
|
|
||||||
-- foreign key(pinned_tweet_id) references tweets(id)
|
-- foreign key(pinned_tweet_id) references tweets(id)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table tweets (rowid integer primary key,
|
create table tweets (rowid integer primary key,
|
||||||
id integer unique not null,
|
id integer unique not null check(typeof(id) = 'integer'),
|
||||||
user_id integer not null,
|
user_id integer not null check(typeof(id) = 'integer'),
|
||||||
text text not null,
|
text text not null,
|
||||||
posted_at integer,
|
posted_at integer,
|
||||||
num_likes integer,
|
num_likes integer,
|
||||||
num_retweets integer,
|
num_retweets integer,
|
||||||
num_replies integer,
|
num_replies integer,
|
||||||
num_quote_tweets integer,
|
num_quote_tweets integer,
|
||||||
has_video boolean,
|
video_url text,
|
||||||
in_reply_to integer,
|
in_reply_to integer,
|
||||||
quoted_tweet integer,
|
quoted_tweet integer,
|
||||||
mentions text, -- comma-separated
|
mentions text, -- comma-separated
|
||||||
|
@ -21,7 +21,7 @@ type Tweet struct {
|
|||||||
NumRetweets int
|
NumRetweets int
|
||||||
NumReplies int
|
NumReplies int
|
||||||
NumQuoteTweets int
|
NumQuoteTweets int
|
||||||
HasVideo bool
|
Video string
|
||||||
InReplyTo TweetID
|
InReplyTo TweetID
|
||||||
|
|
||||||
Urls []string
|
Urls []string
|
||||||
@ -105,7 +105,6 @@ func ParseSingleTweet(apiTweet APITweet) (ret Tweet, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret.QuotedTweet = TweetID(apiTweet.QuotedStatusIDStr)
|
ret.QuotedTweet = TweetID(apiTweet.QuotedStatusIDStr)
|
||||||
ret.HasVideo = false // TODO
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user