package com.dcs.hnyz.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dcs.common.annotation.Excel;
import com.dcs.common.core.domain.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;


import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;

/**
 * 管道实例管理对象 pipeline_instance
 *
 * @author hmy
 * @date 2025-07-04
 */

@Data
@TableName("pipeline_instance")
public class PipelineInstance extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 流程页面 ID
     */
    @Excel(name = "页面 ID")
    @TableField(value = "page_id")
    private Long pageId;

    /**
     * X 坐标（支持百分比、px 等单位）
     */
    @Excel(name = "X 坐标")
    private String x;

    /**
     * Y 坐标
     */
    @Excel(name = "Y 坐标")
    private String y;

    /**
     * 高度
     */
    @Excel(name = "管道长度")
    private String pipeLength;

    /**
     * 宽度
     */
    @Excel(name = "管道宽度")
    private Long pipeWidth;

    /**
     * 旋转角度（0~360）
     */
    @Excel(name = "旋转角度")
    private Long rotate;

    /**
     * 关联模型 ID
     */
    @Excel(name = "关联模型 ID")
    @TableField(value = "model_id")
    private Long modelId;

    /**
     * 管道种类（如 materials、水、气）
     */
    @Excel(name = "管道种类")
    @TableField(value = "pipe_class")
    private String pipeClass;

    /**
     * 流通条件（如：{ "type": "or", "valves": ["N1", "N2"] }）
     */
    @Excel(name = "流通条件")
    @TableField(value = "flow_condition")
    private String flowCondition;

    /**
     * 流通管道种类切换的触发条件
     */
    @Excel(name = "流通管道种类切换的触发条件")
    @TableField(value = "dynamic_pipeline_condition")
    private String dynamicPipelineCondition;

    /**
     * 管道反转触发条件
     */
    @Excel(name = "管道反转触发条件")
    @TableField(value = "reverse_condition")
    private String reverseCondition;

    /**
     * 启用状态（0启用，1禁用）
     */
    @Excel(name = "启用状态", readConverterExp = "0=启用，1禁用")
    private String status;


}
