34 lines
643 B
Go
34 lines
643 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"gorm.io/gorm"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type PusherType int
|
||
|
|
||
|
const (
|
||
|
PusherType_AnPusher = iota + 1
|
||
|
)
|
||
|
|
||
|
type Pusher struct {
|
||
|
ID uint `gorm:"primaryKey" json:"id"`
|
||
|
CreatedAt time.Time `json:"createdAt"`
|
||
|
UpdatedAt time.Time `json:"updatedAt"`
|
||
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||
|
|
||
|
Type PusherType `json:"type"`
|
||
|
Name string `json:"name"`
|
||
|
Remark string `json:"remark"`
|
||
|
RawOption string `json:"option" gorm:"type:json"`
|
||
|
}
|
||
|
|
||
|
func (p *Pusher) TableName() string {
|
||
|
return "pusher"
|
||
|
}
|
||
|
|
||
|
type AnPushOption struct {
|
||
|
Token string `json:"token"`
|
||
|
Channel string `json:"channel"`
|
||
|
}
|