using System.Collections.Generic;

namespace HRM.BO
{
    #region Branch

    public class Branch : BasicBaseObject
    {
        #region Constructor

        public Branch()
        {
            Code = string.Empty;
            Name = string.Empty;
            Address = string.Empty;
            Telephone = string.Empty;
            BankID = 0;
            Bank = null;
            Status = EnumStatus.Active;
        }

        #endregion


        #region Properties

        public string Code { get; set; }
        public string RoutingNo { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public string Telephone { get; set; }
        public int BankID { get; set; }
        public Bank Bank { get; set; }
        public int PayrollTypeID { get; set; }
        //#region Service Factory IBranchService : IBranchService

        //internal static IBranchService Service
        //{
        //    get { return Services.Factory.CreateService<IBranchService>(typeof(IBranchService)); }
        //}

        //#endregion

        #endregion
    }

    #endregion

    #region IBranch Service

    public interface IBranchService
    {
        Branch Get(int id);
        List<Branch> GetChild(int bankID);
        List<Branch> Get(EnumStatus status, int payrolltypeid);
        int Save(Branch item);
        void Delete(int id);
        string GetNextCode();
    }

    #endregion
}