package shop.alien.entity.store.dto;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 优惠券商户发放好友优惠券关系表	
 * </p>
 *
 * @author ssk
 * @since 2025-02-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="LifeDiscountCouponStoreFriend对象", description="优惠券商户发放好友优惠券关系表	")
public class LifeDiscountCouponStoreFriendDto extends Model<LifeDiscountCouponStoreFriendDto> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Integer id;

    @ApiModelProperty(value = "店铺用户id")
    private Integer storeUserId;

    @ApiModelProperty(value = "券id，优惠券时传（对应 life_discount_coupon.id）")
    private Integer couponId;

    @ApiModelProperty(value = "好友店铺 id（接收方 store_info.id）")
    private Integer friendStoreUserId;

    @ApiModelProperty(value = "接收方商户用户 id（可选，store_user.id）")
    private Integer receiverUserId;

    @ApiModelProperty(value = "设置发放好友店铺可用优惠券列表")
    private List<LifeDiscountCouponStoreFriendDto> couponIds;

    /**
     * 赠券接口（setFriendCoupon）中由服务端按 couponId 查询 life_discount_coupon 写入，禁止客户端指定。
     */
    @JsonIgnore
    @ApiModelProperty(hidden = true, value = "已忽略：有效期天数由服务端根据优惠券模板填充")
    private Integer expirationDate;

    @JsonIgnore
    @ApiModelProperty(hidden = true, value = "已忽略：开始日期由服务端根据优惠券模板填充")
    private LocalDate startDate;

    @JsonIgnore
    @ApiModelProperty(hidden = true, value = "已忽略：结束日期由服务端根据优惠券模板填充")
    private LocalDate endDate;

    @ApiModelProperty(value = "库存（优惠券数量）")
    private Integer singleQty;

    @ApiModelProperty(value = "订单id")
    private Integer orderId;



    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
