60 lines
1.2 KiB
TypeScript
60 lines
1.2 KiB
TypeScript
import { RecordModel } from "pocketbase"
|
|
|
|
export namespace DB {
|
|
export interface AppInfo extends RecordModel {
|
|
name: string
|
|
app_id: string
|
|
app_secret: string
|
|
app_name: string
|
|
avatar_url: string
|
|
description: string
|
|
tenant_access_token: string
|
|
}
|
|
|
|
export interface ApiKey extends RecordModel {
|
|
name: string
|
|
user: string
|
|
app: string
|
|
apply_reason: string
|
|
}
|
|
|
|
export interface MessageGroup extends RecordModel {
|
|
desc: string
|
|
id: string
|
|
name: string
|
|
email?: string[]
|
|
chat_id?: string[]
|
|
open_id?: string[]
|
|
union_id?: string[]
|
|
user_id?: string[]
|
|
}
|
|
|
|
export interface MessageLog extends RecordModel {
|
|
api_key: string
|
|
group_id?: string
|
|
receive_id?: string
|
|
receive_id_type?: string
|
|
msg_type: string
|
|
content: string
|
|
final_content?: string
|
|
send_result?: any
|
|
error?: string
|
|
}
|
|
|
|
export type MessageLogCreate = Pick<
|
|
MessageLog,
|
|
| "api_key"
|
|
| "group_id"
|
|
| "receive_id"
|
|
| "receive_id_type"
|
|
| "msg_type"
|
|
| "content"
|
|
| "final_content"
|
|
| "send_result"
|
|
| "error"
|
|
>
|
|
|
|
export type Log = MessageLogCreate
|
|
export type LogCollection = "message_log"
|
|
}
|