mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
register controller
This commit is contained in:
@@ -1,9 +1,25 @@
|
||||
package common
|
||||
|
||||
import "log"
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
"wallet-api/pkg/models"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func CheckError(err error) {
|
||||
if err != nil {
|
||||
log.Fatalf("Error occured. %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func CreateDbModel() models.CommonModel {
|
||||
date := time.Now()
|
||||
dbModel := models.CommonModel{
|
||||
Id: uuid.NewString(),
|
||||
DateCreated: date,
|
||||
DateUpdated: date,
|
||||
}
|
||||
return dbModel
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user