
using MECF.Framework.Common.CommonData;
using System;
using System.Runtime.Serialization;

namespace MECF.Framework.Common.Aitex.Core.RT.EMS
{
    /// <summary>
    /// 维护项相关信息
    /// </summary>
    [Serializable]
    [DataContract]
    public class MaintainerItemConfigInfo: NotifiableItem,ICloneable
    {
        #region Constructors

        /// <summary>
        /// 此构造函数无法添加子项，Add函数不可用
        /// </summary>
        public MaintainerItemConfigInfo()
        {

        }

        /// <summary>
        /// 此构造函数用于构造有子项的维护项
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="mname"></param>
        /// <param name="uid"></param>
        /// <param name="index"></param>
        /// <param name="description"></param>
        /// <param name="defaultrecord"></param>
        /// <param name="filepath"></param>
        public MaintainerItemConfigInfo(string parentname, string mname,string uid,int index,string description,string defaultrecord,string filepath = "")
        {
            ParentName = parentname;
            Name = mname;
            UID = uid;
            Index = index;
            Description = description;
            DefaultRecord = defaultrecord;
            FilePath = filepath;
        }
        #endregion

        #region Properties

        [DataMember]
        public string ParentName { get; set; }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string UID { get; set; }

        [DataMember]
        public int Index { get; set; }

        [DataMember]
        public string Description { get; set; }

        [DataMember]
        public string DefaultRecord { get; set; }

        [DataMember]
        public string FilePath { get; set; }

        public object Clone()
        {
            return new MaintainerItemConfigInfo()
            {
                ParentName = this.ParentName,
                Name = this.Name,
                UID = this.UID,
                Index = this.Index,
                Description = this.Description,
                DefaultRecord = this.DefaultRecord,
                FilePath = this.FilePath,
            };
        }


        #endregion

        #region Methods



        #endregion


    }
}
