supplier-setup-product #138

Merged
sinhluu merged 8 commits from supplier-setup-product into master 2023-02-03 07:53:48 +00:00
3 changed files with 23 additions and 0 deletions
Showing only changes of commit e66596baf6 - Show all commits

8
model/queue_request.go Normal file
View File

@ -0,0 +1,8 @@
package model
type QueueScheduleTaskRequest struct {
ID string `json:"id"`
NatsSubject string `json:"natsSubject"`
Data string `json:"data"`
StartAt int64 `json:"startAt"` // unix
}

View File

@ -15,6 +15,7 @@ var prefixes = struct {
Staff string Staff string
Segment string Segment string
Product string Product string
Queue string
Campaign string Campaign string
Affiliate string Affiliate string
}{ }{
@ -32,6 +33,7 @@ var prefixes = struct {
Staff: "staff", Staff: "staff",
Segment: "segment", Segment: "segment",
Product: "product", Product: "product",
Queue: "queue",
Campaign: "campaign", Campaign: "campaign",
Affiliate: "affiliate", Affiliate: "affiliate",
} }

13
subject/queue.go Normal file
View File

@ -0,0 +1,13 @@
package subject
import "fmt"
func getQueueValue(val string) string {
return fmt.Sprintf("%s.%s", prefixes.Queue, val)
}
var Queue = struct {
ScheduleTask string
}{
ScheduleTask: getQueueValue("schedule_task"),
}