package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 现货商品表
 * </p>
 *
 * @author XKF
 * @since 2024-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("WRSTANDARD")
@ApiModel(value="Wrstandard对象", description="现货商品表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
@KeySequence(value = "SEQ_GOODS")
public class Wrstandard extends Model<Wrstandard> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "现货商品ID(自增 SEQ_GOODS 确保不重复)")
    @TableId(value = "WRSTANDARDID", type = IdType.INPUT)
    private Long wrstandardid;

    @ApiModelProperty(value = "现货商品代码")
    @TableField("WRSTANDARDCODE")
    private String wrstandardcode;

    @ApiModelProperty(value = "现货商品名称")
    @TableField("WRSTANDARDNAME")
    private String wrstandardname;

    @ApiModelProperty(value = "现货品种ID")
    @TableField("DELIVERYGOODSID")
    private Long deliverygoodsid;

    @ApiModelProperty(value = "现货商品单位ID")
    @TableField("UNITID")
    private Integer unitid;

    @ApiModelProperty(value = "最小变动值")
    @TableField("MINIVALUE")
    private Long minivalue;

    @ApiModelProperty(value = "最小变动值小数位")
    @TableField("MINIVALUEDP")
    private Long minivaluedp;

    @ApiModelProperty(value = "实际最小变动值")
    @TableField("REALMINIVALUE")
    private Long realminivalue;

    @ApiModelProperty(value = "实际最小变动值小数位")
    @TableField("REALMINIVALUEDP")
    private Long realminivaluedp;

    @ApiModelProperty(value = "状态 - 作废 - 0:未激活 1:正常")
    @TableField("WRSSTATUS")
    private Integer wrsstatus;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATORID")
    private Long creatorid;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATETIME")
    private Date createtime;

    @ApiModelProperty(value = "更新人")
    @TableField("UPDATORID")
    private Long updatorid;

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATETIME")
    private Date updatetime;

    @ApiModelProperty(value = "要素项定义Json [{'DGFactoryItemTypeID': ,'ItemTypeMode': ,'FactoryItemIDs': },{.....},]DGFactoryItemTypeID - 要素项类型ID --DGFactoryItem->DGFactoryItemTypeIDItemTypeMode - 要素项类型模式 --DGFactoryItem->ItemTypeModeFactoryItemIDs - 选择项IDs--DGFactoryItem->DGFactoryItemID, 逗号分隔")
    @TableField("FACTORYITEMJSON")
    private String factoryitemjson;

    @ApiModelProperty(value = "是否有效 - 0:无效 1:有效")
    @TableField("ISVALID")
    private Integer isvalid;

    @ApiModelProperty(value = "所属机构")
    @TableField("AREAUSERID")
    private Long areauserid;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "标仓系数")
    @TableField("CONVERTFACTOR")
    private BigDecimal convertfactor;

    @ApiModelProperty(value = "现货增值税率")
    @TableField("VATRATE")
    private BigDecimal vatrate;

    @ApiModelProperty(value = "仓储费(固定: 111)")
    @TableField("STORAGEFEE")
    private BigDecimal storagefee;

    @ApiModelProperty(value = "缩略图片(1:1)(逗号分隔)")
    @TableField("THUMURLS")
    private String thumurls;

    @ApiModelProperty(value = "详情图片(逗号分隔)")
    @TableField("PICTUREURLS")
    private String pictureurls;

    @ApiModelProperty(value = "Banner图(逗号分隔)")
    @TableField("BANNERPICURL")
    private String bannerpicurl;

    @ApiModelProperty(value = "供应链提供商")
    @TableField("PROVIDERUSERID")
    private Long provideruserid;

    @ApiModelProperty(value = "供应链提供商资金账户 ID")
    @TableField("PROVIDERACCOUNTID")
    private Long provideraccountid;

    @ApiModelProperty(value = "参考商品ID")
    @TableField("REFGOODSID")
    private Long refgoodsid;

    @ApiModelProperty(value = "参考商品代码")
    @TableField("REFGOODSCODE")
    private String refgoodscode;


    @Override
    public Serializable pkVal() {
        return this.wrstandardid;
    }

}
