update schema model
This commit is contained in:
parent
4e929eacaa
commit
0eb7d69a16
12
model/commands.go
Normal file
12
model/commands.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// Commands - struct
|
||||||
|
type Commands struct {
|
||||||
|
Cmd string `db:"cmd" cc:"cmd"`
|
||||||
|
Message string `db:"message" cc:"message"`
|
||||||
|
Group string `db:"group" cc:"group"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
17
model/donate_setting.go
Normal file
17
model/donate_setting.go
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DonateSetting - struct
|
||||||
|
type DonateSetting struct {
|
||||||
|
Twitch string `db:"twitch" cc:"twitch"`
|
||||||
|
StartDate time.Time `db:"start_date" cc:"start_date"`
|
||||||
|
EndDate time.Time `db:"end_date" cc:"end_date"`
|
||||||
|
TargetAmount int `db:"target_amount" cc:"target_amount"`
|
||||||
|
Title string `db:"title" cc:"title"`
|
||||||
|
Type string `db:"type" cc:"type"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
11
model/facebook_page.go
Normal file
11
model/facebook_page.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// FacebookPage - struct
|
||||||
|
type FacebookPage struct {
|
||||||
|
ID string `db:"id" cc:"id"`
|
||||||
|
LastPost string `db:"lastpost" cc:"lastpost"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
12
model/key_commands.go
Normal file
12
model/key_commands.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// KeyCommands - struct
|
||||||
|
type KeyCommands struct {
|
||||||
|
Key string `db:"key" cc:"key"`
|
||||||
|
Group string `db:"group" cc:"group"`
|
||||||
|
Message string `db:"message" cc:"message"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
13
model/line_group.go
Normal file
13
model/line_group.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// LineGroup - struct
|
||||||
|
type LineGroup struct {
|
||||||
|
ID string `db:"id" cc:"id"`
|
||||||
|
Name string `db:"name" cc:"name"`
|
||||||
|
Notify bool `db:"notify" cc:"notify"`
|
||||||
|
Owner string `db:"owner" cc:"owner"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
13
model/opay_donate_list.go
Normal file
13
model/opay_donate_list.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// OpayDonateList - struct
|
||||||
|
type OpayDonateList struct {
|
||||||
|
OpayID string `db:"opayid" cc:"opayid"`
|
||||||
|
DonateID string `db:"donate_id" cc:"donate_id"`
|
||||||
|
Price int `db:"price" cc:"price"`
|
||||||
|
Text string `db:"text" cc:"text"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
20
model/rt_table.go
Normal file
20
model/rt_table.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
type LineTwitchRT struct {
|
||||||
|
Line string `db:"line" cc:"line"`
|
||||||
|
Twitch string `db:"twitch" cc:"twitch"`
|
||||||
|
Tmpl string `db:"tmpl" cc:"tmpl"`
|
||||||
|
Type string `db:"type" cc:"type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LineFacebookRT struct {
|
||||||
|
Line string `db:"line" cc:"line"`
|
||||||
|
Facebook string `db:"facebook" cc:"facebook"`
|
||||||
|
Tmpl string `db:"tmpl" cc:"tmpl"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LineYoutubeRT struct {
|
||||||
|
Line string `db:"line" cc:"line"`
|
||||||
|
Youtube string `db:"youtube" cc:"youtube"`
|
||||||
|
Tmpl string `db:"tmpl" cc:"tmpl"`
|
||||||
|
}
|
14
model/twitch_channel.go
Normal file
14
model/twitch_channel.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
// TwitchChannel - struct
|
||||||
|
type TwitchChannel struct {
|
||||||
|
ID string `db:"id" cc:"id"`
|
||||||
|
Name string `db:"name" cc:"name"`
|
||||||
|
LastStream string `db:"laststream" cc:"laststream"`
|
||||||
|
Join bool `db:"join" cc:"join"`
|
||||||
|
OpayID string `db:"opayid" cc:"opayid"`
|
||||||
|
Ctime time.Time `db:"ctime" cc:"ctime"`
|
||||||
|
Mtime time.Time `db:"mtime" cc:"ctime"`
|
||||||
|
}
|
@ -42,3 +42,12 @@ func UserLogin(c *context.Context) {
|
|||||||
|
|
||||||
c.Success(nil)
|
c.Success(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UserLogout -
|
||||||
|
func UserLogout(c *context.Context) {
|
||||||
|
session := sessions.Default(c.Context)
|
||||||
|
session.Clear()
|
||||||
|
session.Save()
|
||||||
|
|
||||||
|
c.Success(nil)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user