Smail/backend/models/rule.go
smail f60d3b0880
Some checks are pending
Security Checks / security (push) Waiting to run
整理前后端与测试构建目录并完善配置和安全引导
统一 frontend、backend、test、test-log 和 out 目录,更新构建、部署及测试入口;纳入配置管理兼容与首次安全引导修复;排除本机配置、密钥和测试产物。
2026-09-05 19:19:52 +08:00

16 lines
706 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
type Rule struct {
Id int `xorm:"id int unsigned not null pk autoincr" json:"id"`
UserId int `xorm:"user_id notnull default(0) comment('用户id')" json:"user_id"`
Name string `xorm:"name notnull default('') comment('规则名称')" json:"name"`
Value string `xorm:"value text comment('规则内容')" json:"value"`
Action int `xorm:"action notnull default(0) comment('执行动作,1已读,2转发,3删除')" json:"action"`
Params string `xorm:"params notnull default('') comment('执行参数')" json:"params"`
Sort int `xorm:"sort notnull default(0) comment('排序,越大约优先')" json:"sort"`
}
func (p *Rule) TableName() string {
return "rule"
}