Refactor and improve code consistency across multiple files

- Enhanced SQL queries in `session.go` and `share.go` for clarity and consistency.
- Updated comments for better understanding and maintenance.
- Ensured consistent error handling and return statements across various methods.
This commit is contained in:
M1ngdaXie
2026-02-04 22:01:47 -08:00
parent 0f4cff89a2
commit c84cbafb2c
18 changed files with 629 additions and 631 deletions

View File

@@ -10,8 +10,8 @@ import (
type DocumentVersion struct {
ID uuid.UUID `json:"id"`
DocumentID uuid.UUID `json:"document_id"`
YjsSnapshot []byte `json:"-"` // Omit from JSON (binary)
TextPreview *string `json:"text_preview"` // Full plain text
YjsSnapshot []byte `json:"-"` // Omit from JSON (binary)
TextPreview *string `json:"text_preview"` // Full plain text
VersionNumber int `json:"version_number"`
CreatedBy *uuid.UUID `json:"created_by"`
VersionLabel *string `json:"version_label"`