package com.example.cezenPBX.entity;

import jakarta.persistence.*;

@Table(name = "ps_aors")
@Entity
public class PsAors implements PBXentiry{

    @Id
    @Column(name = "id")
    private String extension;

    @Column(name = "max_contacts")
    private int maxContacts;

    public PsAors(String extension, int maxContacts) {
        this.extension = extension;
        this.maxContacts = maxContacts;
    }

    public PsAors() {
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public int getMaxContacts() {
        return maxContacts;
    }

    public void setMaxContacts(int maxContacts) {
        this.maxContacts = maxContacts;
    }
}

// bellow can also work
//@Table(name = "ps_aors")
//@Entity
//public record PsAors(
//        @Id
//        @Column(name = "id")
//        String extension,
//
//        @Column(name = "max_contacts")
//        int maxContacts
//) implements PBXentiry{
//
//    public PsAors() {
//        this("",0);
//
//    }
//
//    @Override
//    public String getExtension() {
//        return this.extension;
//    }
//}