diff --git a/db/base.go b/db/base.go index b2abec4..8c31991 100644 --- a/db/base.go +++ b/db/base.go @@ -2,9 +2,6 @@ package db import ( "time" - - "github.com/jinzhu/gorm" - "github.com/twinj/uuid" ) type CrudBase struct { @@ -22,14 +19,3 @@ type Base struct { IDBase CrudBase } - -// BaseWithUUID is the base model with an UUIDv4 primary key -type BaseWithUUID struct { - IDBase - CrudBase -} - -// BeforeCreate is called by GORM to set the UUID primary key -func (b *BaseWithUUID) BeforeCreate(scope *gorm.Scope) error { - return scope.SetColumn("ID", uuid.NewV4().String()) -}