using SqlSugar;

namespace OpenAuth.Repository.Domain.workflow;

/// <summary>
/// 流程模板表（zy_flow_template）
/// </summary>
[SugarTable("zy_flow_template")]
public class ZyFlowTemplate
{
    /// <summary>
    /// 模板ID（主键，自增）
    /// </summary>
    [SugarColumn(ColumnName = "template_id", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
    public long TemplateId { get; set; }

    /// <summary>
    /// 流程名称
    /// </summary>
    [SugarColumn(ColumnName = "flow_name", IsNullable = false)]
    public string FlowName { get; set; } = string.Empty;

    /// <summary>
    /// 流程编码（唯一）
    /// </summary>
    [SugarColumn(ColumnName = "flow_code", IsNullable = false)]
    public string FlowCode { get; set; } = string.Empty;

    /// <summary>
    /// 是否启用（默认true）
    /// </summary>
    [SugarColumn(ColumnName = "is_enabled", IsNullable = true)]
    public bool? IsEnabled { get; set; } = true;

    /// <summary>
    /// 创建时间（默认当前时间）
    /// </summary>
    [SugarColumn(ColumnName = "create_time", IsNullable = true)]
    public DateTime? CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "remark", IsNullable = true)]
    public string? Remark { get; set; }
}