Register creation time for peer, user and account (#1654)

This change register creation time for new peers, users and accounts
This commit is contained in:
Maycon Santos
2024-03-02 13:49:40 +01:00
committed by GitHub
parent 452419c4c3
commit aa935bdae3
6 changed files with 36 additions and 6 deletions

View File

@ -206,6 +206,7 @@ type Account struct {
// User.Id it was created by
CreatedBy string
CreatedAt time.Time
Domain string `gorm:"index"`
DomainCategory string
IsDomainPrimaryAccount bool
@ -684,6 +685,7 @@ func (a *Account) Copy() *Account {
return &Account{
Id: a.Id,
CreatedBy: a.CreatedBy,
CreatedAt: a.CreatedAt,
Domain: a.Domain,
DomainCategory: a.DomainCategory,
IsDomainPrimaryAccount: a.IsDomainPrimaryAccount,
@ -1875,6 +1877,7 @@ func newAccountWithId(accountID, userID, domain string) *Account {
acc := &Account{
Id: accountID,
CreatedAt: time.Now().UTC(),
SetupKeys: setupKeys,
Network: network,
Peers: peers,