using Prism.Mvvm;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace PLCSharp.VVMs.Recipe
{
///
/// Recipe
///
public class Recipe : BindableBase
{
///
/// 唯一标识
///
[Key]
public Guid ID { get; set; } = Guid.NewGuid();
private string _Name;
///
/// 配置项
///
public string Name
{
get { return _Name; }
set
{
if (_Name != value)
{
Prompt = "已修改,请保存";
}
SetProperty(ref _Name, value);
}
}
private string _Comment;
///
/// 备注
///
public string Comment
{
get { return _Comment; }
set
{
if (_Comment != value)
{
Prompt = "已修改,请保存";
}
SetProperty(ref _Comment, value);
}
}
private bool _Current;
///
/// 配置项
///
public bool Current
{
get { return _Current; }
set { SetProperty(ref _Current, value); }
}
private string _Prompt;
///
/// 提示
///
[NotMapped]
///
/// 提示
///
public string Prompt
{
get { return _Prompt; }
set { SetProperty(ref _Prompt, value); }
}
}
}