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

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

/**
 * 数据中心日志信息
 *
 * @author 张维新
 */
@ApiModel(description = "关系日志")
@Table(name = "r_data_center_log")
class RDataCenterLog : BaseInfo(){

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

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

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

    /** 数据 */
    @ApiModelProperty(value = "数据")
    @Column(name = "data_source")
    @JSONField(name = "DataSource")
    var dataSource: HashMap<String,Any?>? = null

    /** 操作者 */
    @ApiModelProperty(value = "操作者")
    @Column(name = "author")
    @JSONField(name = "Author")
    var author: String? = null

    /** 对象id */
    @ApiModelProperty(value = "对象id")
    @Column(name = "object_id")
    @JSONField(name = "ObjectId")
    var objectId: String? = null

    /** 来源 */
    @ApiModelProperty(value = "来源")
    @Column(name = "coming")
    @JSONField(name = "Coming")
    var coming: String? = null

    /** 操作者 */
    @ApiModelProperty(value = "操作者")
    @Column(name = "account")
    @JSONField(name = "Account")
    var account: String? = null

    /** ID */
    @ApiModelProperty(value = "ID")
    @Column(name = "from_id")
    @JSONField(name = "FromId")
    var fromId: String? = null

    /** id */
    @ApiModelProperty(value = "id")
    @Column(name = "to_id")
    @JSONField(name = "ToId")
    var toId: String? = null

} // Class DataCenterLogs