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

namespace OASystem.Domain.Entities.PersonnelModule
{
    /// <summary>
    /// 人事模块
    /// 工资表单
    /// </summary>
    [SugarTable("Pm_WageSheet")]
    public class Pm_WageSheet:EntityBase
    {
        /// <summary>
        /// 员工Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int UserId { get; set; }

        /// <summary>
        /// 年月
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
        public string? YearMonth { get; set; }

        /// <summary>
        /// 工资日期 起
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
        public string? StartDate { get; set; }

        /// <summary>
        /// 工资日期 止
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
        public string? EndDate { get; set; }

        /// <summary>
        /// 当月应出勤天数
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int WorkDays { get; set; }

        /// <summary>
        /// 正常出勤天数
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int RegularDays { get; set; }

        /// <summary>
        /// 基本工资
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal Basic { get; set; }

        /// <summary>
        /// 岗位津贴
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal PostAllowance { get; set; }

        /// <summary>
        /// 绩效工资
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal Floats { get; set; }

        /// <summary>
        /// 保密费
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal InformationSecurityFee { get; set; }

        /// <summary>
        /// 服装洗理补贴 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal GarmentWashSubsidies { get; set; }

        /// <summary>
        /// 通讯补贴 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal CommunicationSubsidies { get; set; }

        /// <summary>
        /// 交通补贴 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal TrafficSubsidies { get; set; }



        /// <summary>
        /// 操作奖金 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal OperationBonus { get; set; }

        /// <summary>
        /// 过节费 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal SpecialAllowance { get; set; } = 0.00M;

        /// <summary>
        /// 月度补贴/其他补贴
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal OtherSubsidies { get; set; }

        /// <summary>
        /// 餐补
        /// 不纳入日工资计算
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal Mealsupplement { get; set; }

        /// <summary>
        /// 代扣保险
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal WithholdingInsurance { get; set; }

        /// <summary>
        /// 代扣公积金
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal ReservedFunds { get; set; }

        /// <summary>
        /// 部门集体团建费 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal GroupCost { get; set; }

        /// <summary>
        /// 病假
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal SickLeave { get; set; }

        /// <summary>
        /// 事假
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal SomethingFalse { get; set; }

        /// <summary>
        /// 迟到 
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal LateTo { get; set; }

        /// <summary>
        /// 早退 
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal LeaveEarly { get; set; }

        /// <summary>
        /// 旷工 
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal Absenteeism { get; set; }

        /// <summary>
        /// 未打卡
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal NotPunch { get; set; }

        /// <summary>
        /// 其他扣款
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal OtherDeductions { get; set; }

        /// <summary>
        /// 扣款项 明细
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
        public string? Ex_ItemsRemark { get; set; }

        /// <summary>
        /// 应发合计
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal Should { get; set; }

        /// <summary>
        /// 扣款合计
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal TotalDeductions { get; set; }

        /// <summary>
        /// 实发合计(税后工资)
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal TotalRealHair { get; set; }

        /// <summary>
        /// 代扣个税
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal WithholdingTax { get; set; }

        /// <summary>
        /// 税后工资 弃用
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
        public decimal AfterTax { get; set; }

        /// <summary>
        /// 锁定标识
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public decimal IsLock { get; set; } = 0;

        /// <summary>
        /// 是否确认
        /// 0 否 1 是
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")] 
        public int IsSure { get; set; } = 0;

        /// <summary>
        /// 最后操作人
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int LastUpdateUserId { get; set; }

        /// <summary>
        /// 最后操作时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
        public DateTime LastUpdateDt { get; set; } = DateTime.Now;
    }
}
