package com.ycwl.basic.pricing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ycwl.basic.pricing.dto.BundleProductItem;
import com.ycwl.basic.pricing.handler.BundleProductListTypeHandler;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 一口价配置实体
 */
@Data
@TableName("price_bundle_config")
public class PriceBundleConfig {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 套餐名称
     */
    private String bundleName;
    
    /**
     * 景区ID
     */
    private String scenicId;
    
    /**
     * 套餐价格
     */
    private BigDecimal bundlePrice;
    
    /**
     * 包含商品
     */
    @TableField(typeHandler = BundleProductListTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<BundleProductItem> includedProducts;
    
    /**
     * 排除商品
     */
    @TableField(typeHandler = BundleProductListTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<BundleProductItem> excludedProducts;
    
    /**
     * 套餐描述
     */
    private String description;
    
    /**
     * 是否启用
     */
    private Boolean isActive;
    
    /**
     * 是否可使用优惠券
     */
    private Boolean canUseCoupon;
    
    /**
     * 是否可使用券码
     */
    private Boolean canUseVoucher;
    
    @TableField("create_time")
    private Date createTime;
    
    @TableField("update_time")
    private Date updateTime;
    
    private Long createBy;
    
    private Long updateBy;
    
    private Integer deleted;
    
    private Date deletedAt;
}