Implemented CRUD Helper, every struct needs its own methods
This commit is contained in:
9
models/crudable.go
Normal file
9
models/crudable.go
Normal file
@ -0,0 +1,9 @@
|
||||
package models
|
||||
|
||||
type CRUDable interface {
|
||||
Create()
|
||||
ReadOne(int64) error
|
||||
ReadAll(*User) (interface{}, error)
|
||||
Update()
|
||||
Delete()
|
||||
}
|
Reference in New Issue
Block a user