28 lines
738 B
C#
28 lines
738 B
C#
using FreeSql.DataAnnotations;
|
|
|
|
namespace F9WebAiTest.Domain.Entities.SYS.Departments;
|
|
|
|
/// <summary>部门用户关联:部门与用户的关联记录。</summary>
|
|
[Table(Name = "sys_department_users")]
|
|
public class DepartmentUser : BusinessEntity
|
|
{
|
|
[Column(Name = "department_id")]
|
|
public long DepartmentId { get; private set; }
|
|
|
|
[Column(Name = "user_id")]
|
|
public long UserId { get; private set; }
|
|
|
|
[Column(Name = "assigned_at")]
|
|
public DateTime AssignedAt { get; private set; }
|
|
|
|
public DepartmentUser() { }
|
|
|
|
public DepartmentUser(long id, long departmentId, long userId)
|
|
{
|
|
Id = id;
|
|
DepartmentId = departmentId;
|
|
UserId = userId;
|
|
AssignedAt = DateTime.UtcNow;
|
|
}
|
|
}
|