From 95f9d685dca1e1df719725baa4cc3b8285fd5341 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Wed, 3 Aug 2022 16:26:24 +0300 Subject: [PATCH] updated base model comments --- models/base.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/models/base.go b/models/base.go index 1c9871fa..1b3698db 100644 --- a/models/base.go +++ b/models/base.go @@ -44,7 +44,7 @@ type BaseModel struct { Updated types.DateTime `db:"updated" json:"updated"` } -// HasId returns whether the model has a nonzero primary key (aka. id). +// HasId returns whether the model has a nonzero id. func (m *BaseModel) HasId() bool { return m.GetId() != "" } @@ -66,8 +66,7 @@ func (m *BaseModel) GetUpdated() types.DateTime { // RefreshId generates and sets a new model id. // -// The generated id is a cryptographically random 15 characters length string -// (could change in the future). +// The generated id is a cryptographically random 15 characters length string. func (m *BaseModel) RefreshId() { m.Id = security.RandomString(15) }