1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.Text;
- using System.Threading.Tasks;
- namespace CP.Common
- {
- /// <summary>
- /// 接口返回的json数据结构
- /// </summary>
- [DataContract]
- public class IntJson<T>
- {
- public IntJson()
- {
- this.code = 0;//0代表成功
- this.msg = msg;
- this.stime = stime;
- }
- public IntJson(Body<T> body)
- {
- this.body = body;
- }
- public IntJson(int code, string msg, string stime)
- {
- this.code = code;
- this.msg = msg;
- this.stime = stime;
- }
- [DataMember]
- public int code { get; set; }
- [DataMember]
- public string msg { get; set; }
- [DataMember]
- public string stime { get; set; }
- //public T data { set; get; }
- //[DataMember(IsRequired =false)]
- [DataMember]
- public Body<T> body { get; set; }
- }
- [DataContract]
- public class Body<T>
- {
- [DataMember(IsRequired = false)]
- public int? count { set; get; }
- [DataMember(IsRequired = false)]
- public T data { set; get; }
- }
- }
|