natsio/model/common_request.go

57 lines
1.3 KiB
Go
Raw Normal View History

2022-08-30 04:03:02 +00:00
package model
import "go.mongodb.org/mongo-driver/mongo/options"
type FindWithCondition struct {
Conditions interface{} `json:"conditions"`
Opts []*options.FindOptions `json:"opts"`
}
type FindOneCondition struct {
Conditions interface{} `json:"conditions"`
}
type DistinctWithField struct {
Conditions interface{} `json:"conditions"`
Filed string `json:"filed"`
}
2022-08-31 03:53:51 +00:00
type ActionBy struct {
ID string `json:"id"`
Name string `json:"name"`
}
2023-01-17 09:29:47 +00:00
// RequestCondition ...
type RequestCondition struct {
Code int `json:"code"`
Codes []int `json:"codes"`
DistrictCode int `json:"districtCode"`
ProvinceCode int `json:"provinceCode"`
Slug string `json:"slug"`
OldSlug string `json:"oldSlug"`
Slugs []string `json:"slugs"`
OldSlugs []string `json:"oldSlugs"`
DistrictSlug string `json:"districtSlug"`
ProvinceSlug string `json:"provinceSlug"`
Keyword string `json:"keyword"`
Region string `json:"region"`
Page int64 `json:"page"`
Limit int64 `json:"limit"`
}
2023-10-10 09:11:19 +00:00
type UpdatePayload struct {
Conditions interface{} `json:"conditions"`
Payload interface{} `json:"payload"`
Opts []*options.UpdateOptions `json:"opts"`
}
2023-10-12 08:43:49 +00:00
type WebhookPayloadV2 struct {
Path string `json:"path"` // request URL path from external
Data string `json:"data"` // request body
}