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

import cn.sagacloud.server.datacenter.models.entities.base.RBaseInfo
import com.alibaba.fastjson.annotation.JSONField
import com.google.gson.annotations.SerializedName
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 = "relationship.r_tn2sp")
class RTn2Sp : RBaseInfo(){

    /** 租户Id */
    @ApiModelProperty(value = "租户Id")
    @Id
    @Column(name = "tn_id")
    @JSONField(name = "Id1")
    @SerializedName("Id1")
    var id1: String? = null

    /** 空间Id */
    @ApiModelProperty(value = "空间Id")
    @Id
    @Column(name = "sp_id")
    @JSONField(name = "Id2")
    @SerializedName("Id2")
    var id2: String? = null

    /** 项目Id */
    @ApiModelProperty(value = "项目Id")
    @Id
    @Column(name = "project_id")
    @JSONField(name = "ProjectId")
    @SerializedName("ProjectId")
    var projectId: String? = null

    /** 类型 */
    @ApiModelProperty(value = "类型 " )
    @Id
    @Column(name = "type")
    @JSONField(name = "Type")
    @SerializedName("Type")
    var type: String? = null

    /** 空间类型 */
    @ApiModelProperty(value = "空间类型 " )
    @Column(name = "zone_type")
    @JSONField(name = "ZoneType")
    @SerializedName("ZoneType")
    var zoneType: String? = null

    /** 计算标记 1 为手动 2为自动 */
    @ApiModelProperty(value = "计算标记 1 为手动 2为自动 ")
    @Column(name = "sign")
    @JSONField(name = "Sign")
    @SerializedName("Sign")
    var sign: Int? = null

} // Class REq2Bd