From ab548d249b56988823cc91fa46ad7bfff0d75250 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 31 Jan 2025 20:53:29 +0100 Subject: chore(tfstated): change database account id format to uuidv7 --- pkg/model/account.go | 2 +- pkg/model/session.go | 2 +- pkg/model/version.go | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'pkg/model') diff --git a/pkg/model/account.go b/pkg/model/account.go index 5055943..d47668a 100644 --- a/pkg/model/account.go +++ b/pkg/model/account.go @@ -11,7 +11,7 @@ import ( type AccountContextKey struct{} type Account struct { - Id int + Id string Username string Salt []byte PasswordHash []byte diff --git a/pkg/model/session.go b/pkg/model/session.go index afa6a77..8b2bb01 100644 --- a/pkg/model/session.go +++ b/pkg/model/session.go @@ -8,7 +8,7 @@ type SessionContextKey struct{} type Session struct { Id string - AccountId int + AccountId string Created time.Time Updated time.Time Data any diff --git a/pkg/model/version.go b/pkg/model/version.go index d8c3603..f07db45 100644 --- a/pkg/model/version.go +++ b/pkg/model/version.go @@ -1,13 +1,14 @@ package model import ( + "encoding/json" "time" ) type Version struct { - AccountId int + AccountId string Created time.Time - Data []byte + Data json.RawMessage Id int Lock *string StateId int -- cgit v1.2.3