added model indexes
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package zw.qantra.tm.domain.models;
|
||||
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
import zw.qantra.tm.domain.enums.Status;
|
||||
|
||||
@Entity
|
||||
@Table(name = "otp", indexes = {
|
||||
@Index(name = "idx_otp_username_type", columnList = "username, otp_type"),
|
||||
})
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@@ -17,6 +18,8 @@ public class Otp extends BaseEntity{
|
||||
private String username;
|
||||
private String otp;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "otp_status")
|
||||
private Status otpStatus;
|
||||
@Column(name = "otp_type")
|
||||
private String otpType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user