feat: scope articles by brand
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
type CreateArticleInput struct {
|
||||
TenantID int64
|
||||
BrandID int64
|
||||
SourceType string
|
||||
TemplateID *int64
|
||||
KolPromptID *int64
|
||||
@@ -45,6 +46,7 @@ func NewArticleRepository(db generated.DBTX) ArticleRepository {
|
||||
func (r *articleRepository) CreateArticle(ctx context.Context, input CreateArticleInput) (int64, error) {
|
||||
return r.q.CreateArticle(ctx, generated.CreateArticleParams{
|
||||
TenantID: input.TenantID,
|
||||
BrandID: input.BrandID,
|
||||
SourceType: input.SourceType,
|
||||
TemplateID: pgInt8(input.TemplateID),
|
||||
KolPromptID: pgInt8(input.KolPromptID),
|
||||
|
||||
Reference in New Issue
Block a user