package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品
 *
 * @author 科技小王子
 * @since 2025-04-24 20:52:13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopGoods对象", description = "商品")
@TableName("shop_goods")
public class ShopGoods implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增ID")
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "产品编码")
    private String code;

    @Schema(description = "类型 0软件产品 1实物商品 2虚拟商品")
    private Integer type;

    @Schema(description = "封面图")
    private String image;

    @Schema(description = "父级分类ID")
    private Integer parentId;

    @Schema(description = "产品分类ID")
    private Integer categoryId;

    @Schema(description = "分类名称")
    @TableField(exist = false)
    private String categoryName;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "标签")
    private String tag;

    @Schema(description = "产品规格 0单规格 1多规格")
    private Integer specs;

    @Schema(description = "货架")
    private String position;

    @Schema(description = "单位名称 (个)")
    private String unitName;

    @Schema(description = "商品价格")
    private BigDecimal price;

    @Schema(description = "进货价格")
    private BigDecimal buyingPrice;

    @Schema(description = "经销商价格")
    private BigDecimal dealerPrice;

    @Schema(description = "市场价")
    private BigDecimal salePrice;

    @Schema(description = "佣金")
    private BigDecimal commission;

    @Schema(description = "是否开启分销佣金(0否 1是)")
    private Integer isOpenCommission;

    @Schema(description = "佣金类型(10固定金额 20百分比)")
    private Integer commissionType;

    @Schema(description = "分销佣金(一级)")
    private BigDecimal firstMoney;

    @Schema(description = "分销佣金(二级)")
    private BigDecimal secondMoney;

    @Schema(description = "分销佣金(三级)")
    private BigDecimal thirdMoney;

    @Schema(description = "分红(一级)")
    private BigDecimal firstDividend;

    @Schema(description = "分红(二级)")
    private BigDecimal secondDividend;

    @Schema(description = "配送奖金")
    private BigDecimal deliveryMoney;

    @Schema(description = "推广核验佣金比率")
    private BigDecimal verifyRate;

    @Schema(description = "库存计算方式(10下单减库存 20付款减库存)")
    @JsonAlias({"cdeductStockType"})
    private Integer deductStockType;

    @Schema(description = "交付方式(0不启用)")
    private Integer deliveryMethod;

    @Schema(description = "购买时长(0不启用，1 一次性，2 按时长)")
    private Integer durationMethod;

    @Schema(description = "可购买数量")
    private Integer canBuyNumber;

    @Schema(description = "商品详情")
    private String content;

    @Schema(description = "轮播图")
    private String files;

    @Schema(description = "销量")
    private Integer sales;

    @Schema(description = "库存")
    private Integer stock;

    @Schema(description = "安装次数")
    private Integer install;

    @Schema(description = "评分")
    private BigDecimal rate;

    @Schema(description = "消费赚取积分")
    private BigDecimal gainIntegral;

    @Schema(description = "推荐")
    private Integer recommend;

    @Schema(description = "是否官方")
    private Integer official;

    @Schema(description = "商户ID")
    private Long merchantId;

    @Schema(description = "是否展示")
    private Boolean isShow;

    @Schema(description = "状态, 0上架 1待上架 2待审核 3审核不通过")
    private Integer status;

    @Schema(description = "活动方式: 0全平台 1新用户专享")
    private Integer activityType;

    @Schema(description = "配送方式: 0送上门 1限自提")
    private Integer deliveryMode;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "排序号")
    private Integer sortNumber;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "配送方式:1-自配送 2-自提 4-发快递 多属性用','隔开")
    private String deliveryType;

    @Schema(description = "水票标识 0-否 1-是")
    private Integer waterTicketFlag;

    @Schema(description = "水票ID")
    private Integer waterTickerId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
