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_icon")
class LegendIcon: Legend() {

    /** 图例宽度 */
    @Schema(description = "图例宽度")
    @Column(name = "width")
    var width: Double? = null

    /** 图例高度 */
    @Schema(description = "图例高度")
    @Column(name = "height")
    var height: Double? = null

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

    /** 背景图坐标 */
    @Schema(description = "背景图坐标")
    @Column(name = "bg_pos")
    var bgPos: Pos? = null

    /** 背景图宽度 */
    @Schema(description = "背景图宽度")
    @Column(name = "bg_width")
    var bgWidth: Double? = null

    /** 背景图高度 */
    @Schema(description = "背景图高度")
    @Column(name = "bg_height")
    var bgHeight: Double? = null

    /** 原点坐标 */
    @Schema(description = "原点坐标")
    @Column(name = "origin_pos")
    var originPos: Pos? = null

    /** 锚点数据 */
    @Schema(description = "锚点数据")
    @Column(name = "anchor_list")
    var anchorList: ArrayList<Anchor>? = null

    /** 信息点数据 */
    @Schema(description = "信息点数据")
    @Column(name = "info_point_list")
    var infoPointList: ArrayList<InfoPoint>? = 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_icon", idColumn="id", childIdColumn="class_code")
    var classInfo: DefClass? = null

} // Class LegendIcon