mic-bot/core/entities.ts
2024-10-19 12:00:35 +02:00

23 lines
787 B
TypeScript

// Type used in used in every table that reffers to a specific user
export interface UserID { id: string }
export interface User extends UserID {
// If some user added from the telegram -- tg_id shouldn't be null
// But in case of adding later other ways to interract with the MIC
// We gonna make it nullable
tg_id: number | null
joined_byreferal_from_user_id: number | null
is_chat_participant: boolean
is_captcha_passed: boolean
is_timeout: boolean
is_banned: boolean
created_at: Date
joined_chat_at: Date
timeout_until: Date | null
}
export interface InviteLink {
link: string
expect_user_tg_id: number
}