新增了:发放系统优惠卷

This commit is contained in:
2024-05-31 17:21:26 +08:00
parent d207720a4c
commit 7b021906a2
14 changed files with 767 additions and 24 deletions
+26
View File
@@ -5,6 +5,8 @@ type CouponRequest struct {
AddSystemCoupon // 新增系统优惠卷
PutSystemCoupon // 修改系统优惠卷
PutSystemCouponStatus // 修改系统优惠卷状态
GetUserCouponPage // 获取用户优惠卷列表-分页
GrantSystemCoupon // 发放系统优惠卷
}
// GetSystemCouponPage 获取系统优惠卷列表-分页
@@ -80,3 +82,27 @@ type PutSystemCoupon struct {
type PutSystemCouponStatus struct {
CouponStatus int `json:"coupon_status" form:"coupon_status" label:"状态" validate:"required,oneof=2 3 4"` // 1:正常 2:强制失效 3:结束 4:删除)
}
// GetUserCouponPage 获取用户优惠卷列表-分页
type GetUserCouponPage struct {
Page int `json:"page" form:"page" label:"页码"`
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
CouponName string `json:"coupon_name" form:"coupon_name" label:"优惠卷名称"` // 优惠卷名称
CouponId string `json:"coupon_id" form:"coupon_id" label:"优惠卷编号"` // 优惠卷名称
UserCouponStatus *int `json:"user_coupon_status" form:"user_coupon_status" label:"使用状态(0:未使用 1:已使用 3:已过期)"` // 状态(1:正常 2:强制失效 3:结束 4:删除)
CouponUseDate string `json:"coupon_use_date" form:"coupon_use_date" label:"使用时间"` // 使用时间
ValidStartTime string `json:"valid_start_time" form:"valid_start_time" label:"有效使用时间"` // 有效使用时间
ValidEndTime string `json:"valid_end_time" form:"valid_end_time" label:"过期使用时间"` // 过期使用时间
CreatedAt string `json:"created_at" form:"created_at" label:"创建时间"` // 创建时间
Mobile string `json:"mobile" form:"mobile" label:"手机号"`
UserName string `json:"user_name" form:"user_name" label:"用户名"`
}
// GrantSystemCoupon 发放系统优惠卷
type GrantSystemCoupon struct {
Type int `json:"type" form:"type" label:"用户编号" validate:"required,oneof=1 2"` // 发放类型(1:具体用户 2:全部用户)
UserId string `json:"user_id" form:"user_id" label:"用户编号" validate:"number"` // 用户编号
TotalQuantity int `json:"total_quantity" form:"total_quantity" label:"总发放数量" validate:"required,number,min=1"` // 总发放数量-发完即止
SingleQuantity int `json:"single_quantity" form:"single_quantity" label:"个人可发放数量" validate:"required,number,min=1"` // 个人可发放数量-发完即止,依次发放,到达发放总数量后即停止
IsForce *int `json:"is_follow_rules" form:"is_force_grant" label:"是否遵循优惠卷发放对象规则" validate:"oneof=0 1"` // 是否遵循优惠卷发放对象规则(0:否 1:是)(是:遵循优惠卷发放对象规则进行发放。否:不满足优惠卷发放对象规则也会发放一张)
}