chore: initial commit of HouseholdBudgetBook (backend, frontend, desktop)

This commit is contained in:
mapleferry committed 2026-11-29 21:29:06 +08:00
commit 4a5db3f1f9
167 files changed
+21732

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
package model
import (
"bytes"
"encoding/json"
)
type NullableInt64 struct {
Set bool
Valid bool
Value int64
}
func (n *NullableInt64) UnmarshalJSON(data []byte) error {
n.Set = true
if bytes.Equal(data, []byte("null")) {
n.Valid = false
n.Value = 0
return nil
}
var value int64
if err := json.Unmarshal(data, &value); err != nil {
return err
}
n.Valid = true
n.Value = value
return nil
}