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

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

/// <summary>
/// 工序组关联关系实体
/// </summary>
[Table(Name = DbConsts.TableNamePrefix + "process_group_relation")]
public partial class ProcessGroupRelationEntity : EntityTenant
{
    /// <summary>
    /// 工序组ID
    /// </summary>
    public long ProcessGroupId { get; set; }

    /// <summary>
    /// 工序ID
    /// </summary>
    public long ProcessId { get; set; }

    /// <summary>
    /// 关联类型 (A=>B, A=>B=>C)
    /// </summary>
    [Column(StringLength = 20)]
    public string RelationType { get; set; }

    /// <summary>
    /// 前置工序ID
    /// </summary>
    public long? PredecessorProcessId { get; set; }

    /// <summary>
    /// 后置工序ID
    /// </summary>
    public long? SuccessorProcessId { get; set; }

    /// <summary>
    /// 关联顺序
    /// </summary>
    public int RelationOrder { get; set; }

    /// <summary>
    /// 是否启用
    /// </summary>
    public bool IsEnabled { get; set; } = true;
} 