github.com/chanxuehong/wechat@v0.0.0-20230222024006-36f0325263cd/mp/card/code/code.go (about)

     1  package code
     2  
     3  // 某一张特定卡券的标识
     4  type CardItemIdentifier struct {
     5  	Code   string `json:"code"`              // 卡券的Code码
     6  	CardId string `json:"card_id,omitempty"` // 卡券ID。创建卡券时use_custom_code填写true时必填。非自定义Code不必填写。
     7  }
     8  
     9  // 某一张特定卡券的信息
    10  type CardItem struct {
    11  	Code       string `json:"code"`        // 卡券的Code码
    12  	OpenId     string `json:"openid"`      // 用户openid
    13  	CanConsume bool   `json:"can_consume"` // 是否可核销
    14  	Card       struct {
    15  		CardId    string `json:"card_id"`    // 卡券ID
    16  		BeginTime int64  `json:"begin_time"` // 起始使用时间
    17  		EndTime   int64  `json:"end_time"`   // 结束时间
    18  	} `json:"card"`
    19  }