use dao pattern
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package discord
|
||||
|
||||
import "time"
|
||||
|
||||
// Channel -
|
||||
type Channel struct {
|
||||
ID string `db:"id"`
|
||||
Server string `db:"server"`
|
||||
EnableCMD bool `db:"enable_cmd"`
|
||||
EnableNotify bool `db:"enable_notify"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package discord
|
||||
|
||||
import "time"
|
||||
|
||||
// ChannelFacebookRT -
|
||||
type ChannelFacebookRT struct {
|
||||
Channel string `db:"channel"`
|
||||
Facebook string `db:"facebook"`
|
||||
Tmpl string `db:"tmpl"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
|
||||
// ChannelInstagramRT -
|
||||
type ChannelInstagramRT struct {
|
||||
Channel string `db:"channel"`
|
||||
Instagram string `db:"instagram"`
|
||||
Tmpl string `db:"tmpl"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
|
||||
// ChannelYoutubeRT -
|
||||
type ChannelYoutubeRT struct {
|
||||
Channel string `db:"channel"`
|
||||
Youtube string `db:"youtube"`
|
||||
Tmpl string `db:"tmpl"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
|
||||
// ChannelTwitchRT -
|
||||
type ChannelTwitchRT struct {
|
||||
Channel string `db:"channel"`
|
||||
Twitch string `db:"twitch"`
|
||||
Tmpl string `db:"tmpl"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package discord
|
||||
|
||||
import "time"
|
||||
|
||||
// Server -
|
||||
type Server struct {
|
||||
ID string `db:"id"`
|
||||
Name string `db:"name"`
|
||||
Permission int `db:"permission"`
|
||||
Owner string `db:"owner"`
|
||||
Ctime time.Time `db:"ctime"`
|
||||
Mtime time.Time `db:"mtime"`
|
||||
}
|
||||
Reference in New Issue
Block a user