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 (SetProperty(ref _Name, value)) { Prompt = "已修改,请保存"; } } } private string _Comment; /// /// 备注 /// public string Comment { get { return _Comment; } set { if (SetProperty(ref _Comment, value)) { Prompt = "已修改,请保存"; } } } 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); } } } }