Documentation ¶
Index ¶
- type AuthorizedUser
- type CreateParam
- type DetailParam
- type EntitySnapshot
- type FilterCommonParams
- type FilterOrderParams
- type GoodCreateRequest
- type GoodOrderRequest
- type GoodOrderResponse
- type GoodResponse
- type GoodSnapShot
- type GoodStockRequest
- type GoodStockResponse
- type GoodStockSnapshot
- type GoodUpdateRequest
- type ListParam
- type ListResponse
- type LoginRequest
- type LoginResponse
- type OrderCreateMultipleRequest
- type OrderCreateMultipleResponse
- type OrderInRequest
- type OrderItem
- type OrderItemMultipleResponse
- type OrderItemResponse
- type OrderItemTemp
- type OrderResponse
- type OrderTypeResponse
- type Pagination
- type RegisterRequest
- type SelectAndCount
- type Timestamp
- type UpdateParam
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedUser ¶
func GetAuthorizedUser ¶
func GetAuthorizedUser(ctx context.Context) AuthorizedUser
type CreateParam ¶
type CreateParam[T any] struct { CreateValue T Session AuthorizedUser }
type DetailParam ¶
type DetailParam struct { ID string Session AuthorizedUser }
type EntitySnapshot ¶
type FilterCommonParams ¶
type FilterOrderParams ¶
type GoodCreateRequest ¶
type GoodOrderRequest ¶
type GoodOrderRequest struct {
Code string `json:"code" validate:"min=1,max=10,required"`
}
type GoodOrderResponse ¶
type GoodOrderResponse struct {
Code string `json:"code"`
}
type GoodResponse ¶
type GoodSnapShot ¶
type GoodStockRequest ¶
type GoodStockRequest struct {
Total int
}
type GoodStockResponse ¶
type GoodStockResponse struct {
Total int `json:"total"`
}
type GoodStockSnapshot ¶
type GoodStockSnapshot struct {
Total int `json:"total"`
}
type GoodUpdateRequest ¶
type ListParam ¶
type ListParam[T any] struct { Filters T Orders string Pagination Pagination Session AuthorizedUser }
list param
type ListResponse ¶
type ListResponse[T any] struct { Rows []T `json:"rows"` MetaData Pagination `json:"metadata"` }
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` UserResponse UserResponse `json:"user"` }
type OrderCreateMultipleRequest ¶
type OrderCreateMultipleResponse ¶
type OrderCreateMultipleResponse struct { ID string `json:"id"` Success []OrderItemMultipleResponse `json:"success"` Failed []OrderItemMultipleResponse `json:"failed"` Timestamp }
type OrderInRequest ¶
type OrderInRequest struct { Good GoodOrderRequest `json:"good"` Total int `json:"total" validate:"min=1,number,required"` }
type OrderItemResponse ¶
type OrderItemResponse struct { ID string `json:"id"` GoodSnapshotResponse GoodResponse `json:"good_snapshot"` Total int `json:"total"` Timestamp }
type OrderResponse ¶
type OrderResponse struct { ID string `json:"id"` RequestAt int64 `json:"request_at"` Type OrderTypeResponse `json:"type"` GoodSnapshotResponse *GoodResponse `json:"good_snapshot"` Total int `json:"total"` CountItem int `json:"count_item"` Items []OrderItemResponse `json:"items"` Timestamp }
type OrderTypeResponse ¶
type Pagination ¶
type RegisterRequest ¶
type SelectAndCount ¶
type Timestamp ¶
func ComposeTimestamp ¶
func ComposeTimestamp(m model.TimestampColumn) Timestamp
type UpdateParam ¶
type UpdateParam[T any] struct { ID string UpdateValue T Session AuthorizedUser }
update param
Click to show internal directories.
Click to hide internal directories.