package cn.sagacloud.server.datacenter.models.entities

import cn.sagacloud.server.datacenter.models.entities.base.BaseInfo
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 数据字典表头说明
 *
 * @author 张维新
 */
@ApiModel(description = "数据字典表头说明")
@Table(name = "dict.class_def")
class DClassDef : BaseInfo() {

    /** 编码 */
    @ApiModelProperty(value = "编码")
    @Id
    @Column(name = "id")
    @JSONField(name = "Code")
    var id: String? = null

    /** 名称 */
    @ApiModelProperty(value = "名称")
    @Column(name = "name")
    @JSONField(name = "Name")
    var name: String? = null

    /** 父类指针 */
    @ApiModelProperty(value = "父类指针")
    @Column(name = "parent_id")
    @JSONField(name = "ParentId")
    var parentId: String? = null

    /** 子集列表 */
    @ApiModelProperty(value = "子集列表")
    @JSONField(name = "ListClassDef")
    var listClassDef:ArrayList<DClassDef>? = null

    /** 对应物理世界对象类型 */
    @ApiModelProperty(value = "对应物理世界对象类型")
    @Column(name = "type_platform")
    @JSONField(name = "TypePlatform")
    var typePlatform: String? = null

}// Class DClassDef