BoardResult.cs 666 Bytes
namespace DataAcquisition.ViewModels.Board
{
    public class BoardResult<T> : BoardResult where T : class
    {
        /// <summary>
        /// 数据
        /// </summary>
        public T Data { get; set; } = default!;
    }

    public class BoardResult
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int Code { get; set; } = 200;

        /// <summary>
        /// 成功或失败消息
        /// </summary>
        public string Message { get; set; } = null!;

        /// <summary>
        /// 时间戳
        /// </summary>
        public double Timestamp => DateTimeOffset.Now.ToUnixTimeSeconds();
    }
}