-
Notifications
You must be signed in to change notification settings - Fork 4
/
types.ts
53 lines (46 loc) · 1.03 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import type { ColumnType } from "kysely"
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
? ColumnType<S, I | undefined, U>
: ColumnType<T, T | undefined, T>
export interface Hashtag {
content: string
id: Generated<number>
}
export interface Otp {
code: string
expires_at: string
id: Generated<number>
user_id: number
}
export interface Posting {
content: string
content_id: string
created_at: Generated<string>
id: Generated<number>
like_count: Generated<number>
share_count: Generated<number>
title: string
type: "facebook" | "twitter" | "instagram" | "threads"
updated_at: Generated<string>
user_id: number
view_count: Generated<number>
}
export interface PostingToHashtag {
hashtag_id: number
posting_id: number
}
export interface User {
created_at: Generated<string>
email: string
id: Generated<number>
is_validated: Generated<number>
password: string
name: string
}
export interface DB {
hashtag: Hashtag
otp: Otp
posting: Posting
posting_to_hashtag: PostingToHashtag
user: User
}