23 lines
481 B
Go
23 lines
481 B
Go
package repository
|
|
|
|
import (
|
|
"cron_admin/app/models/cronreportchannelmodel"
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
type ReportChannel struct {
|
|
ICommonRepo[cronreportchannelmodel.CronReportChannel]
|
|
}
|
|
|
|
func NewReportChannelRepo() *ReportChannel {
|
|
return &ReportChannel{
|
|
ICommonRepo: NewCommonRepo[cronreportchannelmodel.CronReportChannel](),
|
|
}
|
|
}
|
|
|
|
func (c *ReportChannel) WithByID(id uint) DBOption {
|
|
return func(g *xorm.Session) *xorm.Session {
|
|
return g.Where("report_channel_id = ?", id)
|
|
}
|
|
}
|