WA-9 - implemented wallet

This commit is contained in:
Fran Jurmanović
2021-05-16 17:43:45 +02:00
parent 32fd64716e
commit 55010c83d6
15 changed files with 64 additions and 68 deletions

View File

@@ -6,13 +6,13 @@ import (
"github.com/google/uuid"
)
type CommonModel struct {
type BaseModel struct {
Id string `json:"id" pg:"id,pk"`
DateCreated time.Time `json:"dateCreated" pg:"datecreated"`
DateUpdated time.Time `json:"dateUpdated" pg:"dateupdated"`
DateCreated time.Time `json:"dateCreated" pg:"date_created"`
DateUpdated time.Time `json:"dateUpdated" pg:"date_updated"`
}
func (cm *CommonModel) Init() {
func (cm *BaseModel) Init() {
date := time.Now()
cm.Id = uuid.NewString()
cm.DateCreated = date