package com.persagy.legend.models.entities

import com.sybotan.service.models.annotations.SCascade
import io.swagger.v3.oas.annotations.media.Schema
import javax.persistence.Column
import javax.persistence.Table

/**
 * 管线类图例
 * @author  zy
 */
@Schema(description = "管线图例")
@Table(name = "labsl_meiku.legend_pipe")
class LegendPipe: Legend() {
    /** 内管线宽度 */
    @Schema(description = "内管线宽度")
    @Column(name = "inner_width")
    var innerWidth: Int? = null

    /** 内管线线型 */
    @Schema(description = "内管线线型")
    @Column(name = "inner_type")
    var innerType: String? = null

    /** 内管线颜色 */
    @Schema(description = "内管线颜色")
    @Column(name = "inner_color")
    var innerColor: String? = null

    /** 外管线宽度 */
    @Schema(description = "外管线宽度")
    @Column(name = "outside_width")
    var outsideWidth: Int? = null

    /** 外管线颜色 */
    @Schema(description = "外管线颜色")
    @Column(name = "outside_color")
    var outsideColor: String? = null

    /** 当前状态 */
    @Schema(description = "当前状态")
    @Column(name = "state")
    var state: String? = null

    /** 状态信息 */
    @Schema(description = "状态信息")
    @SCascade(table="labsl_meiku.state", idColumn="legend_id", childIdColumn="id")
    var stateList: ArrayList<State>? = null

    /** 类型信息 */
    @Schema(description = "类型信息")
    @SCascade(table="labsl_meiku.legend_pipe", idColumn="id", childIdColumn="class_code")
    var classInfo: PipelineCategory? = null

} // Class LegendPipe