diff --git a/src/main/kotlin/com/example/demo/entities/User.kt b/src/main/kotlin/com/example/demo/entities/User.kt index b9e752f..4637485 100644 --- a/src/main/kotlin/com/example/demo/entities/User.kt +++ b/src/main/kotlin/com/example/demo/entities/User.kt @@ -2,6 +2,7 @@ package com.example.demo.entities import io.quarkus.hibernate.orm.panache.kotlin.PanacheCompanion import io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity +import jakarta.persistence.Column import jakarta.persistence.Entity import jakarta.validation.constraints.Email import jakarta.validation.constraints.NotEmpty @@ -12,5 +13,6 @@ class User : PanacheEntity() { @NotEmpty(message = "Login can't be empty") @Email(message = "The email address is invalid.") + @Column(unique = true) lateinit var login: String; } \ No newline at end of file