using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Com.FirmLib.UI
{
    public class VenderItem
    {
        private VenderItem()
        {
        }

        public static VenderItem CreateSupplierItem(string name)
        {
            return CreateItem("supplier", name);
        }
        public static VenderItem CreateInsuerItem(string name)
        {
            return CreateItem("insurer", name);
        }
        public static VenderItem CreateMaintainerItem(string name)
        {
            return CreateItem("maintainer", name);
        }
        /// <summary>
        /// 根据id获取厂商信息【内部未实现，接口不友好，暂时不适用】
        /// </summary>
        /// <param name="venderId"></param>
        /// <returns></returns>
        public static VenderItem CreateItem(string venderId)
        {
            var item = new VenderItem();
            item.Id = venderId;
            return item;
        }

        private static VenderItem CreateItem(string type,string name)
        {
            return new VenderItem(){Type=type,Name=name};
        }

        /// <summary>
        ///厂商类型
        /// </summary>
        public string Type { get; private set; }
        public string Id { get; set; }
        public string Name { get; set; }
    }
}
