All Downloads are FREE. Search and download functionalities are using the official Maven repository.

studio.crud.feature.auth.authentication.model.ForgotPasswordToken.kt Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package studio.crud.feature.auth.authentication.model

import com.antelopesystem.crudframework.crud.annotation.DeleteColumn
import com.antelopesystem.crudframework.crud.annotation.Deleteable
import studio.crud.feature.auth.entity.model.EntityAuthenticationMethod
import studio.crud.feature.jpa.model.AbstractJpaUpdatableEntity
import java.util.*
import javax.persistence.*

@javax.persistence.Entity
@Table(name = "auth_forgot_password_token")
@Deleteable(softDelete = true)
class ForgotPasswordToken(
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "method_id")
    var method: EntityAuthenticationMethod,

    @Column
    var entityId: Long,

    @Column
    var token: String = UUID.randomUUID().toString(),

    @DeleteColumn
    @Column(name = "is_expired", columnDefinition = "BOOLEAN DEFAULT FALSE")
    var expired: Boolean = false,

    @Column
    var deviceHash: String? = null
) : AbstractJpaUpdatableEntity()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy