2023-01-12 22:31:39 +08:00
|
|
|
// @generated automatically by Diesel CLI.
|
|
|
|
|
2024-06-30 17:38:39 +08:00
|
|
|
diesel::table! {
|
|
|
|
chat_local_setting_table (chat_id) {
|
|
|
|
chat_id -> Text,
|
|
|
|
local_model_path -> Text,
|
|
|
|
local_model_name -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-03 14:27:28 +08:00
|
|
|
diesel::table! {
|
|
|
|
chat_message_table (message_id) {
|
|
|
|
message_id -> BigInt,
|
|
|
|
chat_id -> Text,
|
|
|
|
content -> Text,
|
|
|
|
created_at -> BigInt,
|
|
|
|
author_type -> BigInt,
|
|
|
|
author_id -> Text,
|
|
|
|
reply_message_id -> Nullable<BigInt>,
|
2024-08-06 07:56:13 +08:00
|
|
|
metadata -> Nullable<Text>,
|
2024-06-03 14:27:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
chat_table (chat_id) {
|
|
|
|
chat_id -> Text,
|
|
|
|
created_at -> BigInt,
|
|
|
|
name -> Text,
|
2024-06-30 17:38:39 +08:00
|
|
|
local_model_path -> Text,
|
|
|
|
local_model_name -> Text,
|
|
|
|
local_enabled -> Bool,
|
|
|
|
sync_to_cloud -> Bool,
|
2024-06-03 14:27:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-06 16:03:29 +08:00
|
|
|
diesel::table! {
|
|
|
|
collab_snapshot (id) {
|
|
|
|
id -> Text,
|
|
|
|
object_id -> Text,
|
2023-06-07 00:05:27 +08:00
|
|
|
title -> Text,
|
2023-06-06 16:03:29 +08:00
|
|
|
desc -> Text,
|
2023-06-07 00:05:27 +08:00
|
|
|
collab_type -> Text,
|
2023-06-06 16:03:29 +08:00
|
|
|
timestamp -> BigInt,
|
|
|
|
data -> Binary,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-20 07:44:57 +08:00
|
|
|
diesel::table! {
|
|
|
|
upload_file_part (upload_id, e_tag) {
|
|
|
|
upload_id -> Text,
|
|
|
|
e_tag -> Text,
|
|
|
|
part_num -> Integer,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
upload_file_table (workspace_id, file_id, parent_dir) {
|
|
|
|
workspace_id -> Text,
|
|
|
|
file_id -> Text,
|
|
|
|
parent_dir -> Text,
|
|
|
|
local_file_path -> Text,
|
|
|
|
content_type -> Text,
|
|
|
|
chunk_size -> Integer,
|
|
|
|
num_chunk -> Integer,
|
|
|
|
upload_id -> Text,
|
|
|
|
created_at -> BigInt,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-03 09:14:52 +08:00
|
|
|
diesel::table! {
|
|
|
|
user_data_migration_records (id) {
|
|
|
|
id -> Integer,
|
|
|
|
migration_name -> Text,
|
|
|
|
executed_at -> Timestamp,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-12 22:31:39 +08:00
|
|
|
diesel::table! {
|
2021-07-09 16:34:50 +08:00
|
|
|
user_table (id) {
|
|
|
|
id -> Text,
|
|
|
|
name -> Text,
|
2021-07-14 21:12:52 +08:00
|
|
|
workspace -> Text,
|
2022-08-08 22:19:05 +08:00
|
|
|
icon_url -> Text,
|
2023-02-14 10:04:36 +08:00
|
|
|
openai_key -> Text,
|
2023-06-05 18:30:14 +08:00
|
|
|
token -> Text,
|
|
|
|
email -> Text,
|
2023-07-14 13:37:13 +08:00
|
|
|
auth_type -> Integer,
|
2023-08-17 23:46:39 +08:00
|
|
|
encryption_type -> Text,
|
2023-10-09 23:14:24 +08:00
|
|
|
stability_ai_key -> Text,
|
2023-10-24 20:11:06 +08:00
|
|
|
updated_at -> BigInt,
|
2024-06-25 01:59:38 +02:00
|
|
|
ai_model -> Text,
|
2021-07-09 16:34:50 +08:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 16:03:29 +08:00
|
|
|
|
2023-07-29 09:46:24 +08:00
|
|
|
diesel::table! {
|
|
|
|
user_workspace_table (id) {
|
|
|
|
id -> Text,
|
|
|
|
name -> Text,
|
|
|
|
uid -> BigInt,
|
|
|
|
created_at -> BigInt,
|
|
|
|
database_storage_id -> Text,
|
2024-03-13 15:07:52 +08:00
|
|
|
icon -> Text,
|
2023-07-29 09:46:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-14 11:34:23 +08:00
|
|
|
diesel::table! {
|
|
|
|
workspace_members_table (email, workspace_id) {
|
|
|
|
email -> Text,
|
|
|
|
role -> Integer,
|
|
|
|
name -> Text,
|
|
|
|
avatar_url -> Nullable<Text>,
|
|
|
|
uid -> BigInt,
|
|
|
|
workspace_id -> Text,
|
|
|
|
updated_at -> Timestamp,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-03 09:14:52 +08:00
|
|
|
diesel::allow_tables_to_appear_in_same_query!(
|
2024-06-30 17:38:39 +08:00
|
|
|
chat_local_setting_table,
|
2024-06-24 14:19:36 +08:00
|
|
|
chat_message_table,
|
|
|
|
chat_table,
|
|
|
|
collab_snapshot,
|
|
|
|
upload_file_part,
|
|
|
|
upload_file_table,
|
|
|
|
user_data_migration_records,
|
|
|
|
user_table,
|
|
|
|
user_workspace_table,
|
|
|
|
workspace_members_table,
|
2023-08-03 09:14:52 +08:00
|
|
|
);
|