package com.muchinfo.mtp3pojos.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.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 产能预售商品扩展表
 * </p>
 *
 * @author XKF
 * @since 2024-11-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("CPTRADE_PRESALEGOODSEX")
@ApiModel(value="CptradePresalegoodsex对象", description="产能预售商品扩展表")
public class CptradePresalegoodsex extends Model<CptradePresalegoodsex> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品ID")
    private Long goodsid;

    @ApiModelProperty(value = "关联申请ID")
    @TableField("APPLYID")
    private Long applyid;

    @ApiModelProperty(value = "卖方用户ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "卖方账户ID")
    @TableField("ACCOUNTID")
    private Long accountid;

    @ApiModelProperty(value = "关联交易合约ID")
    @TableField("RELATEDGOODSID")
    private Long relatedgoodsid;

    @ApiModelProperty(value = "预售数量")
    @TableField("PRESALEQTY")
    private Long presaleqty;

    @ApiModelProperty(value = "预售开始时间")
    @TableField("STARTTIME")
    private Date starttime;

    @ApiModelProperty(value = "预售结束时间")
    @TableField("ENDTIME")
    private Date endtime;

    @ApiModelProperty(value = "缩略图片(1:1)")
    @TableField("ATTACHMENTURL")
    private String attachmenturl;

    @ApiModelProperty(value = "预售模式 - 1:一口价 2:大宗式竞拍 3:挂牌预售(HSBY) 4:定金大宗 5:定金预售(中签) 枚举'presalemode'")
    @TableField("PRESALEMODE")
    private Integer presalemode;

    @ApiModelProperty(value = "预售市场ID - 根据预售模式选择市场")
    @TableField("MARKETID")
    private Long marketid;

    @ApiModelProperty(value = "参考价单价[一口价、51定金预售中签]")
    @TableField("REFPRICE")
    private BigDecimal refprice;

    @ApiModelProperty(value = "起拍价[大宗式竞拍]")
    @TableField("STARTPRICE")
    private BigDecimal startprice;

    @ApiModelProperty(value = "底价[大宗式竞拍]")
    @TableField("FLOORPRICE")
    private BigDecimal floorprice;

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

    @ApiModelProperty(value = "交易日(yyyyMMdd)")
    @TableField("TRADEDATE")
    private String tradedate;

    @ApiModelProperty(value = "关联交易合约市场ID")
    @TableField("RELATEDMARKETID")
    private Long relatedmarketid;

    @ApiModelProperty(value = "已预售量(预售结束时更新) 71-委托时更新")
    @TableField("PRESALEDQTY")
    private Long presaledqty;

    @ApiModelProperty(value = "已预售总金额(预售结束时更新)71-委托时更新")
    @TableField("PRESALEDAMOUNT")
    private BigDecimal presaledamount;

    @ApiModelProperty(value = "卖方处理状态 - 1:卖方头寸未处理 2:卖方头寸已处理")
    @TableField("SELLSTATUS")
    private Integer sellstatus;

    @ApiModelProperty(value = "详情[大宗]")
    @TableField("GOODSDETAIL")
    private String goodsdetail;

    @ApiModelProperty(value = "成交价[大宗]")
    @TableField("TRADEPRICE")
    private BigDecimal tradeprice;

    @ApiModelProperty(value = "购买上限 [71] - 0为不限")
    @TableField("BUYMAXQTY")
    private Long buymaxqty;

    @ApiModelProperty(value = "预售定金方式(48) - 1：比例  2：固定")
    @TableField("PRESALEDEPOSITALGORITHM")
    private Integer presaledepositalgorithm;

    @ApiModelProperty(value = "预售定金设置值(48)")
    @TableField("PRESALEDEPOSITVALUE")
    private BigDecimal presaledepositvalue;

    @ApiModelProperty(value = "预售状态 - 1：未开始 2:预售中 3:已结束 4：已关闭")
    @TableField("PRESALESTATUS")
    private Integer presalestatus;

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

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

    @ApiModelProperty(value = "中签基数")
    @TableField("BASEQTY")
    private Long baseqty;

    @ApiModelProperty(value = "单人最大申购量")
    @TableField("MAXBUYQTY")
    private Long maxbuyqty;

    @ApiModelProperty(value = "摇号标识 - 0:未摇号 1:已摇号 2:摇号中 3:摇号失败")
    @TableField("LOTTERYFLAG")
    private Integer lotteryflag;

    @ApiModelProperty(value = "摇号总量")
    @TableField("LOTTERYQTY")
    private Long lotteryqty;

    @ApiModelProperty(value = "已中签量成交量")
    @TableField("LUCKYQTY")
    private Long luckyqty;

    @ApiModelProperty(value = "已配售量")
    @TableField("PLACEQTY")
    private Long placeqty;

    @ApiModelProperty(value = "处理状态")
    @TableField("HANDLESTATUS")
    private Integer handlestatus;


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

}
