package app

//SnatchRedEnvelopeRequest is ...
type SnatchRedEnvelopeRequest struct {
	Email       string `json:"email"`         // 邮件地址
	Code        string  `json:"code"`          // 验证码
	RedPacketId int64  `json:"red_packet_id"` // 红包编号
}

//SnatchRedEnvelopeResponse is ...
type SnatchRedEnvelopeResponse struct {
	Amount     string `json:"amount"`
	SignPubKey string `json:"sign_pub_key"`
	Email      string `json:"email"`
	PacketId   string `json:"packet_id"`
}

type AppRedEnvelope struct {
	Id              int64  `json:"id"`
	Email           string `json:"email"`
	RedPacketId     int64  `json:"red_packet_id"`
	Hash            string `json:"hash"`
	DrawStatus      uint8  `json:"draw_status"`
	Amount          int64  `json:"amount"`
	ReceivedAddress string `json:"received_address"`
	CreatedAt       int64  `json:"create_at"`
	UpdatedAt       int64  `json:"update_at"`
}

func (AppRedEnvelope) TableName() string {
	return "app_red_envelopes"
}
