Skip to content

Instantly share code, notes, and snippets.

@hitechqb
Created May 13, 2019 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitechqb/cd2171dc7de5745ada938b0523a2e3b3 to your computer and use it in GitHub Desktop.
Save hitechqb/cd2171dc7de5745ada938b0523a2e3b3 to your computer and use it in GitHub Desktop.
requestFillter
type StoreFilterRequest struct {
SelectedPage *int `gorm:"SelectedPage" json:"page" form:"page"`
PageSize *int `gorm:"PageSize" json:"page_size" form:"page_size"`
Name *string `gorm:"Name" json:"name" form:"name"`
FromCreatedDate time.Time `gorm:"FromCreatedDate" json:"from_created_date" form:"from_created_date" time_format:"2006-01-02"`
ToCreatedDate time.Time `gorm:"ToCreatedDate" json:"to_created_date" form:"to_created_date" time_format:"2006-01-02"`
FromUpdatedDate time.Time `gorm:"FromUpdatedDate" json:"from_updated_date" form:"from_updated_date" time_format:"2006-01-02"`
ToUpdatedDate time.Time `gorm:"ToUpdatedDate" json:"to_updated_date" form:"to_updated_date" time_format:"2006-01-02"`
FromReviewDate time.Time `gorm:"FromReviewDate" json:"from_review_date" form:"from_review_date" time_format:"2006-01-02"`
ToReviewDate time.Time `gorm:"ToReviewDate" json:"to-from_review_date" form:"to_review_date" time_format:"2006-01-02"`
ShopStatus *int `gorm:"ShopStatus" json:"shop_status" form:"shop_status"`
IsBrandShop *bool `gorm:"IsBrandShop" json:"is_brand_shop" form:"is_brand_shop"`
Email *string `gorm:"Email" json:"email" form:"email"`
Mobile *string `gorm:"Mobile" json:"mobile" form:"mobile"`
Id *int `gorm:"Id; primary_key" json:"id" form:"id"`
ShopRegionId *int `gorm:"ShopRegionId" json:"shop_region_id" form:"shop_region_id"`
IsAutoApprove *bool `gorm:"IsAutoApprove" json:"is_auto_approve" form:"is_auto_approve"`
Assignee *string `gorm:"Assignee" json:"assignee" form:"assignee"`
ShopType *int `gorm:"ShopType" json:"shop_type" form:"shop_type"`
IsReview *bool `gorm:"IsReview" json:"is_review" form:"is_review"`
ShopAddress *string `gorm:"ShopAddress" json:"shop_address" form:"shop_address"`
}
@hitechqb
Copy link
Author

Có thể bổ sung các key khác nếu cần anh nhé!
Em đang get theo 1 số params chính thôi :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment