using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.Sale;
using System;
using VT.FW.DB;

namespace Edu.Model.Entity.Course
{
    /// <summary>
    /// 订单实体类
    /// </summary>
    [Serializable]
    [DB(ConnectionName = "DefaultConnection")]
    public class RB_Order
    {
        /// <summary>
        /// 订单编号
        /// </summary>
		public int OrderId { get; set; }

        /// <summary>
        /// 班级id
        /// </summary>
        public int ClassId { get; set; }

        /// <summary>
        /// 交易方式  1线上交易   2线下交易
        /// </summary>
        public TradeWayEnum TradeWay { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Class_Price { get; set; }
        /// <summary>
        /// 成交单价
        /// </summary>
        public decimal Unit_Price { get; set; }
        /// <summary>
        /// 客人数量
        /// </summary>
        public int GuestNum { get; set; }
        /// <summary>
        /// 应收总额
        /// </summary>
        public decimal PreferPrice { get; set; }
        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal Income { get; set; }
        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal Refund { get; set; }
        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal DiscountMoney { get; set; }
        /// <summary>
        /// 平台税金
        /// </summary>
        public decimal PlatformTax { get; set; }
        /// <summary>
        /// 订单状态  枚举
        /// </summary>
        public OrderStateEnum OrderState { get; set; }
        /// <summary>
        /// 订单来源  枚举
        /// </summary>
        public OrderSourceEnum OrderSource { get; set; }
        /// <summary>
        /// 业务人员
        /// </summary>
        public int EnterID { get; set; }
        /// <summary>
        /// 订单来自于  枚举
        /// </summary>
        public OrderFormEnum OrderForm { get; set; }
        private decimal commission = -1;
        /// <summary>
        /// 提成金额
        /// </summary>
        public decimal CommissionMoney { get => commission; set => commission = value; }
        /// <summary>
        /// 额外奖励金额
        /// </summary>
        public decimal ExtraRewardMoney { get; set; }
        /// <summary>
        /// 额外扣除金额
        /// </summary>
        public decimal ExtraDeductMoney { get; set; }
        /// <summary>
        /// 提成是否已发放  1是  0否
        /// </summary>
        public int IsCommissionGive { get; set; }
        /// <summary>
        /// 销售备注
        /// </summary>
        public string SaleRemark { get; set; }
        /// <summary>
        /// 教务备注
        /// </summary>
        public string TeacherRemark { get; set; }
        /// <summary>
        /// 校长备注
        /// </summary>
        public string RectorRemark { get; set; }
        /// <summary>
        /// 经理备注
        /// </summary>
        public string DirectorRemark { get; set; }

        /// <summary>
		/// 集团编号
		/// </summary>
		public int Group_Id { get; set; }

        /// <summary>
        /// 学校编号
        /// </summary>
        public int School_Id { get; set; }

        /// <summary>
        /// 部门id
        /// </summary>
        public int Dept_Id { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public int CreateBy { get; set; }

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

        /// <summary>
        /// 修改人
        /// </summary>
        public int UpdateBy { get; set; }

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

        /// <summary>
        /// 续费订单号
        /// </summary>
        public int RenewOrderId { get; set; }

        /// <summary>
        /// 报价单id
        /// </summary>
        public int OfferId { get; set; }

        /// <summary>
        /// 订单类型
        /// </summary>
        public OrderTypeEnum OrderType { get; set; }

        /// <summary>
        /// 来源编号(OrderType=1,SourceId=0),(OrderType=2,SourceId=留学就业产品对应编号)
        /// </summary>
        public int SourceId { get; set; }
    }
}
