added model indexes

This commit is contained in:
Prince
2026-06-12 22:33:58 +02:00
parent c6ce11026c
commit 573e4b154c
20 changed files with 352 additions and 36 deletions

View File

@@ -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;
}