func (f *ArticleFilter) FilterCategory() pg.Q { if f.CategoryId == 0 { return "" } return pg.MustFormatQ("AND category_id = ?", f.CategoryId) }
func (f *ArticleFilter) FilterName() pg.Q { if f.Name == "" { return "" } return pg.MustFormatQ("AND name = ?", f.Name) }