Files
soul-yongping/soul-api/internal/model/user_rule.go

18 lines
786 B
Go
Raw Normal View History

package model
import "time"
// UserRule 用户旅程触达规则(各节点弹窗标题/说明,由管理端配置)
type UserRule struct {
ID uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
Title string `gorm:"column:title;size:200;not null" json:"title"`
Description string `gorm:"column:description;type:text" json:"description"`
Trigger string `gorm:"column:trigger;size:100" json:"trigger"`
Sort int `gorm:"column:sort;default:0" json:"sort"`
Enabled bool `gorm:"column:enabled;default:true" json:"enabled"`
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
}
func (UserRule) TableName() string { return "user_rules" }