thread-master/backend/internal/model/outreach_draft/usecase/errors.go

35 lines
902 B
Go
Raw Normal View History

2026-06-26 08:37:04 +00:00
package usecase
import (
app "haixun-backend/internal/library/errors"
"haixun-backend/internal/library/errors/code"
)
func errMissingActor() error {
return app.For(code.Brand).InputMissingRequired("tenant_id and uid are required")
}
func errMissingBrand() error {
return app.For(code.Brand).InputMissingRequired("brand id is required")
}
func errMissingScanPost() error {
return app.For(code.Brand).InputMissingRequired("scan_post_id is required")
}
func errMissingDraftID() error {
return app.For(code.Brand).InputMissingRequired("draft_id is required")
}
func errMissingDraftText() error {
return app.For(code.Brand).InputMissingRequired("draft text cannot be empty")
}
func errDraftNotFound() error {
return app.For(code.Brand).ResNotFound("outreach draft not found")
}
func errInvalidDraftIndex() error {
return app.For(code.Brand).InputInvalidFormat("draft_index out of range")
}