using Hncore.Infrastructure.Data;
using Hncore.Infrastructure.DDD;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Data;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Hncore.Infrastructure.WebApi;
using Hncore.Pass.Manage.Request;

namespace Hncore.Pass.Manage.Response 
{
    public class EditManagerResponse 

    {

        /// <summary>
        /// 用户数据库ID
        /// <summary>
        public  int Id { get; set; }

        /// <summary>
        /// 所属物业ID
        /// <summary>
        public int OwnerId { get; set; }

        /// <summary>
        /// 创建时间
        /// <summary>
        public  DateTime CreateTime { get; set; }

        /// <summary>
        /// 管理员登录名
        /// </summary>
        public string LoginCode { get; set; }

        /// <summary>
        /// 管理员手机号
        /// </summary>
        public string Phone   { get; set; }


        /// <summary>
        /// 更新时间
        /// <summary>
        public  DateTime UpdateTime { get; set; }

        public EditManagerResponse  FromEntity(Domain.Manager manager)
        {

            Id = manager.Id;
            LoginCode = manager.LoginCode ;
            Phone = manager.Phone;
            OwnerId = manager.TenantId;
            CreateTime = manager.CreateTime;
            UpdateTime = manager.UpdateTime;


            return this;
        }


    }
}
