package com.persagy.server.datacenter.models.entities.dictnew

import com.persagy.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 平台字典对象类型
 *
 * @author  wx
 * @date  2020/9/19 16:37
 */
@ApiModel(description = "平台字典对象类型")
@Table(name = "dict.def_class")
class DefClass : SBaseEntity(){

    /** 全局id */
    @ApiModelProperty(value = "全局 id")
    @Id
    @Column(name = "id")
    var  id: String? = null

    /** 编码 */
    @ApiModelProperty(value = "编码")
    @Column(name = "code")
    var  code: String? = null

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

    @ApiModelProperty(value = "别编码")
    @Column(name = "alias_code")
    var aliasCode: String? = null

    @ApiModelProperty(value = "别编名")
    @Column(name = "alias_name")
    var aliasName: String? = null

    @ApiModelProperty(value = "分类:common平台级, group集团级, project项目级")
    @Column(name = "type")
    var type: String? = null

    @ApiModelProperty(value = "集团id, 默认为 '0' ")
    @Column(name = "group_code")
    var groupCode: String? = ""

    @ApiModelProperty(value = "项目id, 默认为 '0' ")
    @Column(name = "project_id")
    var projectId: String? = ""

    @ApiModelProperty(value = "上级类型编码")
    @Column(name = "parent_code")
    var parentCode: String? = null

    @ApiModelProperty(value = "专业编码")
    @Column(name = "major_code")
    var majorCode: String? = null

    @ApiModelProperty(value = "系统编码")
    @Column(name = "system_code")
    var systemCode: String? = null

    @ApiModelProperty(value = "部件所属的设备类型")
    @Column(name = "equipment_code")
    var equipmentCode: String? = null

    @ApiModelProperty(value = "对象类型")
    @Column(name = "obj_type")
    var objType: String? = null

    @ApiModelProperty(value = "子列表")
    var children:ArrayList<DefClass>? = null

} // Class DefClass