SalaryCalculationConfig.cs 1.9 KB
using System;
using System.Collections.Generic;

namespace LqSalaryCalculationService.Models
{
    /// <summary>
    /// 工资核算配置模型
    /// </summary>
    public class SalaryCalculationConfig
    {
        /// <summary>
        /// 计算月份
        /// </summary>
        public string CalculationMonth { get; set; } = string.Empty;

        /// <summary>
        /// 输出路径
        /// </summary>
        public string OutputPath { get; set; } = "./output";

        /// <summary>
        /// 备份路径
        /// </summary>
        public string BackupPath { get; set; } = "./backup";

        /// <summary>
        /// 日志路径
        /// </summary>
        public string LogPath { get; set; } = "./logs";

        /// <summary>
        /// 是否启用邮件通知
        /// </summary>
        public bool EnableEmailNotification { get; set; } = true;

        /// <summary>
        /// 邮件设置
        /// </summary>
        public EmailSettings EmailSettings { get; set; } = new EmailSettings();
    }

    /// <summary>
    /// 邮件设置
    /// </summary>
    public class EmailSettings
    {
        /// <summary>
        /// SMTP服务器
        /// </summary>
        public string SmtpServer { get; set; } = string.Empty;

        /// <summary>
        /// SMTP端口
        /// </summary>
        public int SmtpPort { get; set; } = 587;

        /// <summary>
        /// 用户名
        /// </summary>
        public string Username { get; set; } = string.Empty;

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; } = string.Empty;

        /// <summary>
        /// 发件人邮箱
        /// </summary>
        public string FromEmail { get; set; } = string.Empty;

        /// <summary>
        /// 收件人邮箱列表
        /// </summary>
        public List<string> ToEmails { get; set; } = new List<string>();
    }
}