feat: per-user feedback AI prompt template with placeholder keys

This commit is contained in:
dev
2026-10-06 18:55:04 +03:00
parent 285ee84c98
commit a73b1b3f8c
8 changed files with 269 additions and 8 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ const BACKUP_FORMAT_VERSION = 2;
const BACKUP_MIN_FORMAT_VERSION = 1;
const BACKUP_TABLES = [
'groups', 'students', 'entries', 'project_files', 'branches', 'users', 'user_branches',
'user_settings',
'group_photos', 'entry_photos', 'modules', 'student_photos', 'share_links', 'photo_jobs',
'lesson_reports', 'lesson_report_versions', 'audit_log', 'notifications',
'notification_reads', 'banned_ips', 'chat_threads', 'chat_messages', 'chat_attachments',
@@ -537,7 +538,13 @@ function normalizeRestoreData(data) {
created_at: optTs(r.created_at),
updated_at: optTs(r.updated_at),
}));
return { groups, students, entries, project_files, settings, branches, users, user_branches, entry_photos, student_photos, group_photos, share_links, modules, photo_jobs, lesson_reports, lesson_report_versions, audit_log, notifications, notification_reads, banned_ips, chat_threads, chat_messages, chat_attachments, short_messages, feedbacks };
const user_settings = (data.user_settings || []).map(x => ({
user_id: reqInt(x.user_id),
key: reqStr(x.key, 100),
value: optText(x.value, 8000),
updated_at: optTs(x.updated_at),
}));
return { groups, students, entries, project_files, settings, branches, users, user_branches, user_settings, entry_photos, student_photos, group_photos, share_links, modules, photo_jobs, lesson_reports, lesson_report_versions, audit_log, notifications, notification_reads, banned_ips, chat_threads, chat_messages, chat_attachments, short_messages, feedbacks };
}
module.exports = {