appier/struct.go

44 lines
958 B
Go
Raw Normal View History

2022-03-23 02:12:54 +00:00
package appier
2022-03-23 03:36:14 +00:00
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
2022-03-23 02:12:54 +00:00
// RequestBody ...
type RequestBody struct {
Body []byte `json:"body"`
}
// Payload ...
type Payload struct {
Data []byte
}
2022-03-23 03:36:14 +00:00
// AppID custom ObjectID
type AppID = primitive.ObjectID
// BrandPayload ...
type BrandPayload struct {
2022-03-23 08:05:08 +00:00
ID AppID `json:"_id"`
Name string `json:"name"`
Slug string `json:"slug"`
SearchString string `json:"searchString"`
Active bool `json:"active"`
Photos []string `json:"photos"`
Desc string `json:"desc"`
TotalProduct int64 `json:"totalProduct"`
Logo string `json:"logo"`
Country CountryInfo `json:"country"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
2022-03-23 03:36:14 +00:00
}
// CountryInfo ...
type CountryInfo struct {
2022-03-23 08:05:08 +00:00
ID AppID `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
2022-03-23 03:36:14 +00:00
}