package cn.ysk.cashier.pojo.shop;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.io.Serializable;

/**
 * @author ww
 * @date 2024-04-25
 **/
@Entity
@Data
@Table(name="tb_purchase_notice")
public class TbPurchaseNotice implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "自增")
    private Integer id;

    @Column(name = "`coupon_id`")
    @ApiModelProperty(value = "商户卷Id")
    private Integer couponId;

    @Column(name = "`date_used`")
    @ApiModelProperty(value = "使用日期说明")
    private String dateUsed;

    @Column(name = "`available_time`")
    @ApiModelProperty(value = "可用时间说明")
    private String availableTime;

    @Column(name = "`booking_type`")
    @ApiModelProperty(value = "预约方式")
    private String bookingType;

    @Column(name = "`refund_policy`")
    @ApiModelProperty(value = "退款说明")
    private String refundPolicy;

    @Column(name = "`usage_rules`")
    @ApiModelProperty(value = "使用规则(富文本)")
    private String usageRules;

    @Column(name = "`invoice_info`")
    @ApiModelProperty(value = "发票说明")
    private String invoiceInfo;

    @Column(name = "`group_pur_info`")
    @ApiModelProperty(value = "团购价说明")
    private String groupPurInfo;

    @Column(name = "`market_price_Info`")
    @ApiModelProperty(value = "门市价/划线价说明")
    private String marketPriceInfo;

    @Column(name = "`discount_Info`")
    @ApiModelProperty(value = "折扣说明")
    private String discountInfo;

    @Column(name = "`platform_tips`")
    @ApiModelProperty(value = "平台温馨提示")
    private String platformTips;

    public void copy(TbPurchaseNotice source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
