feat(server-go): 微信订阅消息骨架(#11,绑定/订阅/巡检触发,配置占位)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// WechatBinding 用户微信订阅绑定
|
||||
type WechatBinding struct {
|
||||
ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
|
||||
UserID string `gorm:"column:user_id;type:uuid;uniqueIndex" json:"userId"`
|
||||
OpenID string `gorm:"column:open_id;size:128;uniqueIndex" json:"openId"`
|
||||
AuthorizedTemplates json.RawMessage `gorm:"column:authorized_templates;type:jsonb" json:"authorizedTemplates,omitempty"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (WechatBinding) TableName() string { return "wechat_bindings" }
|
||||
Reference in New Issue
Block a user