| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- package request
- type IDRequestParam interface {
- Params
- GetID() string
- }
- type IDJsonBody struct {
- ID string `json:"id" binding:"required" assign:"toField:ID"`
- }
- func (id *IDJsonBody) GetID() string {
- return id.ID
- }
- type IDPathParam struct {
- ID string `uri:"id" binding:"required" assign:"toField:ID"`
- }
- func (id *IDPathParam) GetID() string {
- return id.ID
- }
- type IDQueryParam struct {
- ID string `form:"id" binding:"required" assign:"toField:ID"`
- }
- func (id *IDQueryParam) GetID() string {
- return id.ID
- }
- type TenantIDRequestParam interface {
- Params
- GetTenantID() string
- }
- type TenantIDJsonBody struct {
- TenantID string `json:"tenant_id" binding:"required" assign:"toField:TenantID"`
- }
- func (id *IDJsonBody) GetTenantID() string {
- return id.ID
- }
- type TenantIDPathParam struct {
- TenantID string `uri:"tenant_id" binding:"required" assign:"toField:TenantID"`
- }
- func (id *IDPathParam) GetTenantID() string {
- return id.ID
- }
- type TenantIDQueryParam struct {
- TenantID string `form:"tenant_id" binding:"required" assign:"toField:TenantID"`
- }
- func (id *IDQueryParam) GetTenantID() string {
- return id.ID
- }
- type QueryRequestParams interface {
- Params
- GetPageNo() int
- GetPageSize() int
- }
- type BaseQueryParams struct {
- PageNo int `form:"pageNo" assign:"-"`
- PageSize int `form:"pageSize" assign:"-"`
- }
- func (q *BaseQueryParams) GetPageNo() int {
- return q.PageNo
- }
- func (q *BaseQueryParams) GetPageSize() int {
- return q.PageSize
- }
- type QueryWithIDRequestParams interface {
- IDRequestParam
- QueryRequestParams
- }
- type BaseQueryWithIDParams struct {
- IDQueryParam
- BaseQueryParams
- }
- type CreateUserIDJsonBody struct {
- CreateUserID string `json:"createUserId" binding:"required" assign:"toField:CreateUserID"`
- }
- type UpdateUserIDJsonBody struct {
- UpdateUserID string `json:"updateUserId" binding:"required" assign:"toField:LastUpdateUserID"`
- }
- type DeleteUserIDPathParams struct {
- DeleteUserID string `uri:"deleteUserId" binding:"required" assign:"toField:LastUpdateUserID"`
- }
|