You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* 版权所有 (c) 2025 WenJY 保留所有权利。
* CLR版本: 4.0.30319.42000
* 机器名称: Mr.Wen's MacBook Pro
* 命名空间: Sln.Iot.Model.dto
* 唯一标识: A23DD86E-3AEA-42E2-98A4-97FD9BCD19ED
*
* 创建者: WenJY
* 电子邮箱:
* 创建时间: 2025-05-09 15:39:12
* 版本: V1.0.0
* 描述:
*
*--------------------------------------------------------------------
* 修改人:
* 时间:
* 修改说明:
*
* 版本: V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace Sln.Iot.Model.dto
{
/// <summary>
/// API结果
/// </summary>
public class ApiResInfo
{
/// <summary>
/// 状态码: 200-OK; 500-失败/异常
/// </summary>
public int code { get ; set ; }
/// <summary>
/// 是否成功: T-成功; F-失败
/// </summary>
public bool isSuc { get ; set ; }
/// <summary>
/// 返回信息
/// </summary>
public string msg { get ; set ; }
/// <summary>
/// 设备指令
/// </summary>
public byte [ ] buffer { get ; set ; }
/// <summary>
/// 设备数据封装
/// </summary>
public object data { get ; set ; }
/// <summary>
/// 成功
/// </summary>
/// <param name="msg"></param>
/// <param name="data"></param>
/// <returns></returns>
public static ApiResInfo Success ( string msg , object data = null )
{
return new ApiResInfo ( )
{
code = 200 ,
isSuc = true ,
msg = msg ,
data = data
} ;
}
/// <summary>
/// 失败
/// </summary>
/// <param name="msg"></param>
/// <param name="data"></param>
/// <returns></returns>
public static ApiResInfo Fail ( string msg , object data = null )
{
return new ApiResInfo ( )
{
code = 500 ,
isSuc = false ,
msg = msg ,
data = data
} ;
}
}
}