12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package binlog
- import (
- "time"
- "github.com/beego/beego/v2/client/orm"
- )
- type BusinessSysInteractionLog struct {
- ID uint32 `orm:"column(id);pk"`
- InteractionKey string
- InteractionVal string
- Remark string
- ModifyTime time.Time
- CreateTime time.Time
- }
- func (m *BusinessSysInteractionLog) TableName() string {
- return "business_sys_interaction_log"
- }
- var BusinessSysInteractionLogColumns = struct {
- ID string
- InteractionKey string
- InteractionVal string
- Remark string
- ModifyTime string
- CreateTime string
- }{
- ID: "id",
- InteractionKey: "interaction_key",
- InteractionVal: "interaction_val",
- Remark: "remark",
- ModifyTime: "modify_time",
- CreateTime: "create_time",
- }
- func (m *BusinessSysInteractionLog) Create() (err error) {
- o := orm.NewOrmUsingDB("data")
- _, err = o.Insert(m)
- return
- }
- func (m *BusinessSysInteractionLog) Update(cols []string) (err error) {
- o := orm.NewOrmUsingDB("data")
- _, err = o.Update(m, cols...)
- return
- }
- var BinlogFileNameKey = "binlog_edb_info_filename"
- var BinlogPositionKey = "binlog_edb_info_position"
- func GetBusinessSysInteractionLogByKey(key string) (item *BusinessSysInteractionLog, err error) {
- o := orm.NewOrmUsingDB("data")
- sql := "SELECT * FROM business_sys_interaction_log WHERE interaction_key = ?"
- err = o.Raw(sql, key).QueryRow(&item)
- return
- }
|