namespace Long.Core.Api;

/// <summary>
/// Easyui 返回结果
/// </summary>
public class EasyuiResult
{
    /// <summary>
    /// 总记录数
    /// </summary>
    public int total { get; set; }

    /// <summary>
    /// 成功标记
    /// </summary>
    public bool success { get; set; } = true;

    /// <summary>
    /// 消息
    /// </summary>
    public string message { get; set; } = string.Empty;
}

/// <summary>
/// Easyui 数据列表返回结果
/// </summary>
/// <typeparam name="T"></typeparam>
public class EasyuiGridResult<T>
{
    /// <summary>
    /// 总记录数
    /// </summary>
    public int total { get; set; }

    /// <summary>
    /// 成功标记
    /// </summary>
    public bool success { get; set; } = true;

    /// <summary>
    /// 消息
    /// </summary>
    public string message { get; set; } = string.Empty;

    /// <summary>
    /// 数据
    /// </summary>
    public IEnumerable<T> rows { get; set; } = Enumerable.Empty<T>();
}