agregar tabla hu_drafts con UUID como PK + CRUD Rust + puente frontend

This commit is contained in:
2026-05-27 23:19:12 -05:00
parent 278d2bf075
commit 53c6d4325c
3 changed files with 170 additions and 24 deletions
+53 -24
View File
@@ -73,34 +73,22 @@ export interface ImpairmentRecord {
updated_at: string | null
}
export interface WorkItemRecord {
id: number
project_id: number
export interface HuDraftRecord {
id: string
initiative_id: number | null
code: string | null
title: string
description: string | null
type: string
status: string
priority: string
}
export interface AlphaUserRecord {
id: number
email: string
first_name: string
last_name: string
role: string | null
seniority: string | null
cell_id: number | null
is_active: boolean
created_at: string | null
}
export interface CellRecord {
id: number
name: string
description: string | null
acceptance_criteria: string | null
item_type: string | null
hierarchy_path: string | null
story_points: number | null
sprint: string | null
assigned_to: string | null
sync_status: string
kappa_id: number | null
created_at: string | null
updated_at: string | null
}
export interface ProjectMemberRecord {
@@ -153,6 +141,36 @@ export interface PerformanceRecord {
calculated_at: string | null
}
export interface WorkItemRecord {
id: number
project_id: number
code: string | null
title: string
description: string | null
type: string
status: string
priority: string
}
export interface AlphaUserRecord {
id: number
email: string
first_name: string
last_name: string
role: string | null
seniority: string | null
cell_id: number | null
is_active: boolean
created_at: string | null
}
export interface CellRecord {
id: number
name: string
description: string | null
created_at: string | null
}
export const tauriDb = {
// Projects
getProjects(): Promise<ProjectRecord[]> {
@@ -265,4 +283,15 @@ export const tauriDb = {
deleteImpairment(id: number): Promise<void> {
return safeInvoke('delete_impairment', { id })
},
// HU Drafts
getHuDrafts(initiativeId?: number): Promise<HuDraftRecord[]> {
return safeInvoke('get_hu_drafts', { initiativeId: initiativeId ?? null })
},
saveHuDraft(draft: HuDraftRecord): Promise<void> {
return safeInvoke('save_hu_draft', { draft })
},
deleteHuDraft(id: string): Promise<void> {
return safeInvoke('delete_hu_draft', { id })
},
}