package com.ruoyi.mall.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;

import java.math.BigDecimal;
/**
 * 商品信息对象 mall_product
 *
 * @author zcc
 */

@Data
@TableName("mall_product")
public class Product extends BaseAudit {
    private static final long serialVersionUID = 1L;


    @TableId
    private Long id;


    @Excel(name = "BRAND_ID")
    private Long brandId;


    @Excel(name = "CATEGORY_ID")
    private Long categoryId;


    @Excel(name = "商品编码")
    private String outProductId;


    @Excel(name = "NAME")
    private String name;


    @Excel(name = "主图")
    private String pic;


    @Excel(name = "画册图片，连产品图片限制为5张，以逗号分割")
    private String albumPics;


    @Excel(name = "上架状态：0->下架；1->上架")
    private Integer publishStatus;


    @Excel(name = "排序")
    private Integer sort;


    @Excel(name = "PRICE")
    private BigDecimal price;


    @Excel(name = "单位")
    private String unit;


    @Excel(name = "商品重量，默认为克")
    private BigDecimal weight;


    @Excel(name = "商品销售属性，json格式")
    //"[{\"name\":\"颜色\",\"options\":[{\"name\":\"粉\"},{\"name\":\"绿色\"},{\"name\":null}]},{\"name\":\"尺寸\",\"options\":[{\"name\":\"大\"},{\"name\":\"小\"},{\"name\":null}]}]"
    private String productAttr;


    @Excel(name = "产品详情网页内容")
    private String detailHtml;


    @Excel(name = "移动端网页详情")
    private String detailMobileHtml;


    @Excel(name = "品牌名称")
    private String brandName;


    @Excel(name = "商品分类名称")
    private String productCategoryName;

    //    0->商品；1->课程
    private Integer isCourse;

    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private Long courseId;
    /**
     * 客服id
     */
    private Long customerService;
    /**
     * 教练id
     */
    private Long instructor;
    private Long storeId;
    private String tenantId;
}
