using System;
using FreeSql.DataAnnotations;
using ZhonTai.Admin.Core.Entities;
using NPP.SmartSchedue.Api.Contracts.Core.Consts;
using NPP.SmartSchedue.Api.Contracts.Domain.Personnel;

namespace NPP.SmartSchedue.Api.Contracts.Domain.Work;

/// <summary>
/// 工作任务FL人员关联实体
/// </summary>
[Table(Name = DbConsts.TableNamePrefix + "work_order_fl_personnel")]
public partial class WorkOrderFLPersonnelEntity : EntityBase
{
    /// <summary>
    /// 工作任务ID
    /// </summary>
    public long WorkOrderId { get; set; }

    /// <summary>
    /// FL人员ID
    /// </summary>
    public long FLPersonnelId { get; set; }

    /// <summary>
    /// FL人员姓名
    /// </summary>
    [Column(StringLength = 100)]
    public string FLPersonnelName { get; set; } = "";

    /// <summary>
    /// 人员实体
    /// </summary>
    [Navigate("PersonnelId")]
    public PersonnelEntity? PersonnelEntity { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public new DateTime CreatedTime { get; set; } = DateTime.Now;
}