Developer 058d8edffa 添加通知系统和工作任务分配功能
- 新增通知系统完整架构,包含通知设置、历史记录、任务管理等核心功能
- 实现工作任务分配服务,支持人员和设备的智能分配
- 添加人员分组管理功能,支持灵活的通知目标配置
- 完善相关枚举定义和数据传输对象

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 08:34:01 +08:00

108 lines
2.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using FreeSql.DataAnnotations;
using ZhonTai.Admin.Core.Entities;
using NPP.SmartSchedue.Api.Contracts.Core.Consts;
using NPP.SmartSchedue.Api.Contracts.Core.Enums;
namespace NPP.SmartSchedue.Api.Contracts.Domain.Notification;
/// <summary>
/// 人员组实体
/// 决策点4混合人员组支持静态+动态规则
/// 决策点5不支持多租户继承EntityBase
/// </summary>
[Table(Name = DbConsts.TableNamePrefix + "personnel_group")]
public partial class PersonnelGroupEntity : EntityBase
{
#region
/// <summary>
/// 人员组名称
/// </summary>
[Column(StringLength = 200)]
[Required(ErrorMessage = "人员组名称不能为空")]
public string GroupName { get; set; } = "";
/// <summary>
/// 人员组描述
/// </summary>
[Column(StringLength = 500)]
public string Description { get; set; } = "";
/// <summary>
/// 人员组类型
/// </summary>
public int GroupType { get; set; } = (int)PersonnelGroupTypeEnum.Mixed;
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnabled { get; set; } = true;
#endregion
#region
/// <summary>
/// 静态人员ID列表JSON格式存储[1,2,3,4,5]
/// </summary>
[Column(DbType = "text")]
public string StaticPersonnelIds { get; set; } = "[]";
#endregion
#region
/// <summary>
/// 动态规则部门ID列表JSON格式存储[1,2,3]
/// 当GroupType包含DynamicByDepartment时有效
/// </summary>
[Column(DbType = "text")]
public string DynamicDepartmentIds { get; set; } = "[]";
/// <summary>
/// 动态规则职位列表JSON格式存储["经理","主管","组长"]
/// 当GroupType包含DynamicByPosition时有效
/// </summary>
[Column(DbType = "text")]
public string DynamicPositions { get; set; } = "[]";
/// <summary>
/// 动态规则:是否仅包含激活人员
/// </summary>
public bool OnlyActivePersonnel { get; set; } = true;
#endregion
#region
/// <summary>
/// 排除人员ID列表JSON格式存储
/// 在动态规则生成的人员列表中排除这些人员
/// </summary>
[Column(DbType = "text")]
public string ExcludePersonnelIds { get; set; } = "[]";
#endregion
#region
/// <summary>
/// 最后修改时间
/// </summary>
public DateTime? LastModifiedTime { get; set; }
#endregion
#region
/// <summary>
/// 使用此人员组的通知设置列表
/// </summary>
[Navigate("PersonnelGroupId")]
public List<NotificationSettingEntity> NotificationSettings { get; set; } = new List<NotificationSettingEntity>();
#endregion
}