package gaf3.core.services.bind.entity

import javax.persistence.*
import java.io.Serializable
import java.time.LocalDateTime
import java.util.*


/**
 * The persistent class for the GAF_GROUP_ROLE database table.
 *
 */
@Entity
@Table(name = "GAF_BIND_ITEM")
class GafBindItem : Serializable {

    @Id
    @Column(name = "ID", length = 48)
    var id: String? = null

    @Column(name = "BIND_TYPE", length = 48)
    var type: String? = null

    @Column(name = "SOURCE", length = 48)
    var source: String? = null

    @Column(name = "TARGET", length = 48)
    var target: String? = null

    @Column(name = "PARAM")
    var param: String? = null

    @Column(name = "REMARK")
    var remark: String? = null

    @Column(name = "CREATED_AT")
    var createdAt: LocalDateTime? = null

    @PrePersist
    fun insertTime() {
        createdAt = LocalDateTime.now()
    }

    companion object {
        private const val serialVersionUID = 1L
    }

}