package com.project.whatsappchatbot.model;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

import javax.persistence.*;

@Entity
@Data
@Getter
@Setter
@Table(name = "accounts", uniqueConstraints = @UniqueConstraint(columnNames = "username"))
public class Account {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "account_id")
    private Long accountId;

    @Column(name = "username", unique = true)
    private String username;

    private String password;
    private String fullName;
    private String email;
    private String role;
    private String status;
    
    @Column(name = "phone")
    private String phone;
    
    private String otp;
    private LocalDateTime otpExpiryTime;

}