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.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 今日账户交易规则信表
控制服务在待开市时清空表，然后从基础数表生成数据，各服务使用此表数据做为当天交易参数，当日修改的数据隔日生效
 * </p>
 *
 * @author XKF
 * @since 2024-07-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("TODAY_ACCOUNTTRADERULE")
@ApiModel(value="TodayAccounttraderule对象", description="今日账户交易规则信表 控制服务在待开市时清空表，然后从基础数表生成数据，各服务使用此表数据做为当天交易参数，当日修改的数据隔日生效")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TodayAccounttraderule extends Model<TodayAccounttraderule> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账号ID")
    @TableId(value = "ACCOUNTID")
    private Long accountid;

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

    @ApiModelProperty(value = "交易规则信息(存储配置的Protobuffer串)")
    @TableField("INFOCONTENT")
    private byte[] infocontent;

    @ApiModelProperty(value = "市场ID")
    @TableField("MARKETID")
    private Long marketid;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATEDATE")
    private Date createdate;

    @ApiModelProperty(value = "交易类型 - 1:投资者/自营 2:做市")
    @TableField("TRADETYPE")
    private Integer tradetype;


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

}
