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

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

/**
 * <p>
 * 市场运行时间段明细
 * </p>
 *
 * @author XKF
 * @since 2025-05-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("MARKETRUNSTEPDETAIL")
@ApiModel(value="Marketrunstepdetail对象", description="市场运行时间段明细")
@KeySequence(value = "SEQ_MARKETRUNSTEPDETAIL")
public class Marketrunstepdetail extends Model<Marketrunstepdetail> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID")
    @TableId(value = "AUTOID", type = IdType.INPUT)
    private Long autoid;

    @ApiModelProperty(value = "市场ID --  其它特殊如下 0-系统 1-交割服务 2-账户服务3-履约服务 4-仓单服务 5-积分服务 6-银行服务")
    @TableField("MARKETID")
    private Long marketid;

    @ApiModelProperty(value = "交易日归属 - 0:星期天、1:星期一、2:星期二、3:星期三、4:星期四、5:星期五、6:星期六")
    @TableField("TRADEWEEKDAY")
    private Integer tradeweekday;

    @ApiModelProperty(value = "从 1 开始 往下编")
    @TableField("SECTIONID")
    private Integer sectionid;

    @ApiModelProperty(value = "运行阶段 - 1:集合竞价、  2:连续竞价(交割)  3:-- 4:确认行权、交收时段、(补充交收")
    @TableField("RUNSTEP")
    private Integer runstep;

    @ApiModelProperty(value = "开市时间")
    @TableField("STARTWEEKDAY")
    private Integer startweekday;

    @ApiModelProperty(value = "起始时间(HH:mm)")
    @TableField("STARTTIME")
    private String starttime;

    @ApiModelProperty(value = "休市时间")
    @TableField("ENDWEEKDAY")
    private Integer endweekday;

    @ApiModelProperty(value = "结束时间(HH:mm)")
    @TableField("ENDTIME")
    private String endtime;

    @ApiModelProperty(value = "开始日标识 - (...-3上三日 -2:上两日 -1:上日 0:当日 1:次日...)")
    @TableField("STARTFLAG")
    private Integer startflag;

    @ApiModelProperty(value = "结束日标识 - (...-3上三日 -2:上两日 -1:上日 0:当日 1:次日...)")
    @TableField("ENDFLAG")
    private Integer endflag;


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

}
