use dao pattern

This commit is contained in:
root committed 2019-09-16 14:06:23 +00:00
1 parent 4f8749a969
commit 9936519c70
9 files changed
+184

No files matched your search

+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)
}