using System;
using System.Collections.Generic;
using System.Text;

namespace Sugar.Enties
{
    /// <summary>
    /// 租户信息
    /// </summary>
    public class Tenant
    {
        /// <summary>
        /// 租户姓名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Tel { get; set; }
        /// <summary>
        /// 联系人
        /// </summary>
        public string ContractPerson { get; set; }
        /// <summary>
        /// 物主编号
        /// </summary>
        public string ownerid { get; set; }
        /// <summary>
        /// 微信id
        /// </summary>

        public string WinxinId { get; set; }
        /// <summary>
        /// 租赁房屋信息集合
        /// </summary>
        public List<House> Houses { get; set; }
    }
    /// <summary>
    /// 租赁房屋信息
    /// </summary>
    public class House
    {
        /// <summary>
        /// 房产编号
        /// </summary>
       public string hcode { get; set; }
        /// <summary>
        /// 房产名
        /// </summary>
        public string hname { get; set; }
        /// <summary>
        /// 租赁面积
        /// </summary>
        public string area { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public string price { get; set; }

        /// <summary>
        /// 数据总数
        /// </summary>
        public int totalcount { get; set; }


    }
    /// <summary>
    /// 绑定租户输入参数
    /// </summary>
    public class BindTenantInput
    {
        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 微信ID
        /// </summary>
        public string WechatOpenID { get; set; }
        /// <summary>
        /// 类型 1:绑定 0：解绑   2:判断是否绑定
        /// </summary>
        public string Type { get; set; }
    }
    /// <summary>
    /// 绑定租户输出对象
    /// </summary>
    public class BindTenantOut
    {
        /// <summary>
        /// 绑定状态 1：已绑定  2：绑定成功  3:绑定失败  4：解绑成功  5：解绑失败 
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 相应输出信息
        /// </summary>
        public string msg { get; set; }
    }
    /// <summary>
    /// 缴费接口输入参数对象
    /// </summary>
    public class PaymentInput
    {
        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartDate { get; set; }
        /// <summary>
        /// 微信ID
        /// </summary>
        public string WechatOpenID { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public string EndDate { get; set; }

        
    }
    /// <summary>
    /// 租户缴费信息主信息
    /// </summary>
    public class PaymentInfo
    {
        /// <summary>
        /// 租户名
        /// </summary>
        public string RentName { get; set; }
        /// <summary>
        /// 房产名
        /// </summary>
        public string Hname { get; set; }
        /// <summary>
        /// 房产编号
        /// </summary>
        public string HCode { get; set; }
        /// <summary>
        /// 租赁面积
        /// </summary>
        public string Harea { get; set; }
        /// <summary>
        /// 租期开始时间
        /// </summary>
        public string StartDate { get; set; }
        /// <summary>
        /// 租期结束时间
        /// </summary>
        public string EndDate { get; set; }

        public List<PayMentDetail> PayMentDetails { get; set; }
    }
    /// <summary>
    /// 租户缴费明细信息
    /// </summary>
    public class PayMentDetail
    {
        /// <summary>
        /// 费用类型
        /// </summary>
        public string FareType { get; set; }
        /// <summary>
        /// 应缴金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal ReceivedAmount { get; set; }
        /// <summary>
        /// 缴费状态 0:未缴清  1：已缴清
        /// </summary>
        public int State { 
            get { 
                if(Amount>ReceivedAmount)
                {
                    return 0;
                }
                else
                {
                    return 1;
                }
            } 
        }
        /// <summary>
        /// 缴费期间
        /// </summary>
        public string Revpeoioddate { get; set; }
        /// <summary>
        /// 缴费日期
        /// </summary>
        public string FareDate { get; set; }
    }
}
