49 lines
704 B
C#
49 lines
704 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace StoreHub.KJDWebService.Models
|
|
{
|
|
public class Result
|
|
{
|
|
public Result()
|
|
{
|
|
|
|
}
|
|
public Result(int code, string msg)
|
|
{
|
|
Code = code;
|
|
Msg = msg;
|
|
}
|
|
|
|
public int Code { get; set; }
|
|
public string Msg { get; set; }
|
|
public object Data { get; set; }
|
|
|
|
public static Result Success(string msg)
|
|
{
|
|
return new Result
|
|
{
|
|
Code = 200,
|
|
Msg = msg
|
|
};
|
|
}
|
|
public static Result Failure(string msg)
|
|
{
|
|
return new Result
|
|
{
|
|
Code = 500,
|
|
Msg = msg
|
|
};
|
|
}
|
|
//参数不合法
|
|
public static Result ArgumentNull()
|
|
{
|
|
return new Result { Code = 19999, Msg = "输入为空" };
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|