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

import com.alibaba.fastjson.annotation.JSONField
import com.persagy.server.datacenter.models.entities.base.RBaseInfo
import com.persagy.server.datacenter.models.entities.objects.Project
import com.persagy.service.models.annotations.SCascade
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 = "scantask.scan_scheme_info")
class ScanSchemeInfo : RBaseInfo()  {

    /** 信息点id */
    @ApiModelProperty(value = "信息点id")
    @Id
    @Column(name = "id")
    @JSONField(name = "SchemeEquipInfoId")
    var id: String? = null

    /** 方案id */
    @ApiModelProperty(value = "方案id")
    @Column(name = "scheme_id")
    @JSONField(name = "SchemeId")
    var schemeId: String? = null
    /** 方案id */
    @ApiModelProperty(value = "方案id")
    @Column(name = "scheme_code")
    @JSONField(name = "SchemeCode")
    var schemeCode: String? = null

    /** 序号 */
    @ApiModelProperty(value = "序号")
    @Column(name = "num")
    @JSONField(name = "Num")
    var num: Int? = null

    /** 执行对象 */
    @ApiModelProperty(value = "执行对象")
    @Column(name = "exec_target")
    @JSONField(name = "ExecTarget")
    var execTarget: String? = null

    /** 是否找到 */
    @ApiModelProperty(value = "是否找到")
    @Column(name = "is_find")
    @JSONField(name = "IsFind")
    var isFind: Boolean? = null

    /** 操作 */
    @ApiModelProperty(value = "操作")
    @Column(name = "option")
    @JSONField(name = "Option")
    var option: String? = null

    /** 强制 */
    @ApiModelProperty(value = "强制")
    @Column(name = "is_compulsory")
    @JSONField(name = "IsCompulsory")
    var isCompulsory: Boolean? = null

    /** 可选 */
    @ApiModelProperty(value = "可选")
    @Column(name = "is_optional")
    @JSONField(name = "IsOptional")
    var isOptional: Boolean? = null

    /** 忽略 */
    @ApiModelProperty(value = "忽略")
    @Column(name = "is_ignored")
    @JSONField(name = "IsIgnored")
    var isIgnored: Boolean? = null

    /** 项目id */
    @ApiModelProperty(value = "项目id",required = true)
    @Column(name = "project_id")
    @JSONField(name = "ProjectId")
    var projectId: String? = null

    /** 级联-项目   table  对应关系表   idColumn 对应 本类的id    childIdColumn 级联对象的关系id */
    @ApiModelProperty(value = "级联-项目")
    @SCascade(table="scantask.scan_scheme_info", idColumn="id", childIdColumn="project_id")
    @JSONField(name = "Project")
    var project: Project? = null

    /** 级联-方案  */
    @ApiModelProperty(value = "级联-方案")
    @SCascade(table="scantask.scan_scheme_info", idColumn="id", childIdColumn="scheme_id")
    @JSONField(name = "ScanScheme")
    var scanScheme: ScanScheme? = null

} // Class ScanSchemeInfo