PhoneToolMX/PhoneToolMX.Models/Models/Extension.cs
snow flurry 4fb88d6cbb Move Password from Phone to Extension
I misunderstood pjsip's concept of endpoints/AoRs. Multiple devices can be bound to a single endpoint, which in turn can have multiple AoRs. So the password should be bound to an Extension, not a Phone.
2023-10-20 12:57:22 -07:00

27 lines
783 B
C#

using PhoneToolMX.Data;
using PhoneToolMX.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PhoneToolMX.Models {
public class Extension: OwnedBase {
public ICollection<Phone> Phones { get; set; }
[Header("Ext.", Primary = true, Small = true)]
public int ExtId { get; set; }
[Header("Directory Name")]
[Required]
public string DirectoryName { get; set; }
[Header("Listed?", Small = true)]
public bool Listed { get; set; }
public CustomData HoldMusic { get; set; }
[NotMapped]
public string ListViewName => $"{DirectoryName} ({ExtId})";
public string Password { get; set; }
}
}