package com.cpop.mall.business.entity;

import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 商城-商品表 实体类。
 *
 * @author DB
 * @since 2023-10-23
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_mall_product", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Product extends BaseEntity implements Serializable {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 商品名
     */
    private String productName;

    /**
     * 产品类型(0:课卡;1:周边;2:优惠卷:3:其他)
     */
    private Integer productType;

    /**
     * 品牌id
     */
    private String brandId;

    /**
     * 商店(校区)集合
     */
    private String storeIds;

    /**
     * 描述
     */
    private String description;

    /**
     * 商品图地址
     */
    private String picUrl;

    /**
     * 商品详情图地址
     */
    private String picDetailUrl;

    /**
     * 购买限制(0:会员限制;1:新客限定;2:用户限购)
     */
    private Integer buyRestrict;

    /**
     * 限购数量
     */
    private Integer limitNum;

    /**
     * 支付方式(0:微信支付;1:积分支付)
     */
    private Integer payType;

    /**
     * 上下架
     */
    private Boolean isUp;

    /**
     * 是否置顶
     */
    private Boolean isTop;

    /**
     * 最高价/最高消耗积分 消费
     */
    private BigDecimal maxConsume;

    /**
     * 最低价/最低消耗积分
     */
    private BigDecimal minConsume;

    /**
     * 课卡模板id
     */
    private String cardTemplateId;

    /**
     * 逻辑删除（0否1是）
     */
    @Column(isLogicDelete = true)
    private Boolean isDelete;

}
