use dao pattern

This commit is contained in:
Jay
2019-09-16 14:06:23 +00:00
parent 4f8749a969
commit 9936519c70
9 changed files with 184 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package public
import (
dsmodel "dorisbot/database/models/discord"
pubmodel "dorisbot/database/models/public"
)
// FacebookDAO -
type FacebookDAO interface {
Create(fb *pubmodel.FacebookPage) error
UpdatePost(fb *pubmodel.FacebookPage, postID string) error
GetByID(id string) (pubmodel.FacebookPage, error)
GetAll() ([]pubmodel.FacebookPage, error)
Delete(id string) error
GetChannels() ([]dsmodel.Channel, error)
}