2023-01-12 14:31:39 +00:00
|
|
|
// @generated automatically by Diesel CLI.
|
|
|
|
|
2024-06-30 09:38:39 +00:00
|
|
|
diesel::table! {
|
|
|
|
chat_local_setting_table (chat_id) {
|
|
|
|
chat_id -> Text,
|
|
|
|
local_model_path -> Text,
|
|
|
|
local_model_name -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-03 06:27:28 +00: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-05 23:56:13 +00:00
|
|
|
metadata -> Nullable<Text>,
|
2024-06-03 06:27:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
chat_table (chat_id) {
|
|
|
|
chat_id -> Text,
|
|
|
|
created_at -> BigInt,
|
|
|
|
name -> Text,
|
2024-08-08 04:07:00 +00:00
|
|
|
local_files -> Text,
|
|
|
|
metadata -> Text,
|
2024-06-30 09:38:39 +00:00
|
|
|
local_enabled -> Bool,
|
|
|
|
sync_to_cloud -> Bool,
|
2024-06-03 06:27:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-06 08:03:29 +00:00
|
|
|
diesel::table! {
|
|
|
|
collab_snapshot (id) {
|
|
|
|
id -> Text,
|
|
|
|
object_id -> Text,
|
2023-06-06 16:05:27 +00:00
|
|
|
title -> Text,
|
2023-06-06 08:03:29 +00:00
|
|
|
desc -> Text,
|
2023-06-06 16:05:27 +00:00
|
|
|
collab_type -> Text,
|
2023-06-06 08:03:29 +00:00
|
|
|
timestamp -> BigInt,
|
|
|
|
data -> Binary,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-19 23:44:57 +00: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,
|
2024-08-20 07:18:57 +00:00
|
|
|
is_finish -> Bool,
|
2024-06-19 23:44:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-03 01:14:52 +00:00
|
|
|
diesel::table! {
|
|
|
|
user_data_migration_records (id) {
|
|
|
|
id -> Integer,
|
|
|
|
migration_name -> Text,
|
|
|
|
executed_at -> Timestamp,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-12 14:31:39 +00:00
|
|
|
diesel::table! {
|
2021-07-09 08:34:50 +00:00
|
|
|
user_table (id) {
|
|
|
|
id -> Text,
|
|
|
|
name -> Text,
|
2021-07-14 13:12:52 +00:00
|
|
|
workspace -> Text,
|
2022-08-08 14:19:05 +00:00
|
|
|
icon_url -> Text,
|
2023-02-14 02:04:36 +00:00
|
|
|
openai_key -> Text,
|
2023-06-05 10:30:14 +00:00
|
|
|
token -> Text,
|
|
|
|
email -> Text,
|
2023-07-14 05:37:13 +00:00
|
|
|
auth_type -> Integer,
|
2023-08-17 15:46:39 +00:00
|
|
|
encryption_type -> Text,
|
2023-10-09 15:14:24 +00:00
|
|
|
stability_ai_key -> Text,
|
2023-10-24 12:11:06 +00:00
|
|
|
updated_at -> BigInt,
|
2024-06-24 23:59:38 +00:00
|
|
|
ai_model -> Text,
|
2021-07-09 08:34:50 +00:00
|
|
|
}
|
|
|
|
}
|
2023-06-06 08:03:29 +00:00
|
|
|
|
2023-07-29 01:46:24 +00:00
|
|
|
diesel::table! {
|
|
|
|
user_workspace_table (id) {
|
|
|
|
id -> Text,
|
|
|
|
name -> Text,
|
|
|
|
uid -> BigInt,
|
|
|
|
created_at -> BigInt,
|
|
|
|
database_storage_id -> Text,
|
2024-03-13 07:07:52 +00:00
|
|
|
icon -> Text,
|
2023-07-29 01:46:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-14 03:34:23 +00: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 01:14:52 +00:00
|
|
|
diesel::allow_tables_to_appear_in_same_query!(
|
2024-06-30 09:38:39 +00:00
|
|
|
chat_local_setting_table,
|
2024-06-24 06:19:36 +00: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 01:14:52 +00:00
|
|
|
);
|