55 lines
1.3 KiB
C#
55 lines
1.3 KiB
C#
|
using System.ComponentModel;
|
||
|
|
||
|
namespace DispenserUI.Models.VO;
|
||
|
|
||
|
public class DefinitionVO : INotifyPropertyChanged
|
||
|
{
|
||
|
public string _validateDesc;
|
||
|
|
||
|
public string _value;
|
||
|
public string Name { get; set; }
|
||
|
public string Code { get; set; }
|
||
|
public string InputType { get; set; }
|
||
|
public bool Nullable { get; set; }
|
||
|
public bool Enable { get; set; }
|
||
|
public bool Writable { get; set; }
|
||
|
|
||
|
public string ValidateDesc
|
||
|
{
|
||
|
get => _validateDesc;
|
||
|
set
|
||
|
{
|
||
|
if (_validateDesc != value)
|
||
|
{
|
||
|
_validateDesc = value;
|
||
|
OnPropertyChanged(nameof(ValidateDesc));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public string DefaultValue { get; set; }
|
||
|
|
||
|
public string Value
|
||
|
{
|
||
|
get => _value;
|
||
|
set
|
||
|
{
|
||
|
if (_value != value)
|
||
|
{
|
||
|
_value = value;
|
||
|
OnPropertyChanged(nameof(Value));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public int MaxLength { get; set; }
|
||
|
public decimal MinValue { get; set; }
|
||
|
public decimal MaxValue { get; set; }
|
||
|
|
||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||
|
|
||
|
protected virtual void OnPropertyChanged(string propertyName)
|
||
|
{
|
||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||
|
}
|
||
|
}
|