177 lines
5.8 KiB
C#
177 lines
5.8 KiB
C#
|
/*
|
||
|
* 后台API
|
||
|
*
|
||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||
|
*
|
||
|
* OpenAPI spec version: Admin
|
||
|
*
|
||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||
|
*/
|
||
|
|
||
|
using System;
|
||
|
using System.Linq;
|
||
|
using System.IO;
|
||
|
using System.Text;
|
||
|
using System.Text.RegularExpressions;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Collections.ObjectModel;
|
||
|
using System.Runtime.Serialization;
|
||
|
using Newtonsoft.Json;
|
||
|
using Newtonsoft.Json.Converters;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||
|
|
||
|
namespace IO.Swagger.Model
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// NcSkuDetail
|
||
|
/// </summary>
|
||
|
[DataContract]
|
||
|
public partial class NcSkuDetail : IEquatable<NcSkuDetail>, IValidatableObject
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Initializes a new instance of the <see cref="NcSkuDetail" /> class.
|
||
|
/// </summary>
|
||
|
/// <param name="code">编码.</param>
|
||
|
/// <param name="parentCode">成套件编码.</param>
|
||
|
/// <param name="tjnum">数量.</param>
|
||
|
/// <param name="detail">明细.</param>
|
||
|
public NcSkuDetail(string code = default(string), string parentCode = default(string), double? tjnum = default(double?), List<NcSkuDetail> detail = default(List<NcSkuDetail>))
|
||
|
{
|
||
|
this.Code = code;
|
||
|
this.ParentCode = parentCode;
|
||
|
this.Tjnum = tjnum;
|
||
|
this.Detail = detail;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编码
|
||
|
/// </summary>
|
||
|
/// <value>编码</value>
|
||
|
[DataMember(Name="code", EmitDefaultValue=false)]
|
||
|
public string Code { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 成套件编码
|
||
|
/// </summary>
|
||
|
/// <value>成套件编码</value>
|
||
|
[DataMember(Name="parentCode", EmitDefaultValue=false)]
|
||
|
public string ParentCode { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 数量
|
||
|
/// </summary>
|
||
|
/// <value>数量</value>
|
||
|
[DataMember(Name="tjnum", EmitDefaultValue=false)]
|
||
|
public double? Tjnum { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 明细
|
||
|
/// </summary>
|
||
|
/// <value>明细</value>
|
||
|
[DataMember(Name="detail", EmitDefaultValue=false)]
|
||
|
public List<NcSkuDetail> Detail { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns the string presentation of the object
|
||
|
/// </summary>
|
||
|
/// <returns>String presentation of the object</returns>
|
||
|
public override string ToString()
|
||
|
{
|
||
|
var sb = new StringBuilder();
|
||
|
sb.Append("class NcSkuDetail {\n");
|
||
|
sb.Append(" Code: ").Append(Code).Append("\n");
|
||
|
sb.Append(" ParentCode: ").Append(ParentCode).Append("\n");
|
||
|
sb.Append(" Tjnum: ").Append(Tjnum).Append("\n");
|
||
|
sb.Append(" Detail: ").Append(Detail).Append("\n");
|
||
|
sb.Append("}\n");
|
||
|
return sb.ToString();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns the JSON string presentation of the object
|
||
|
/// </summary>
|
||
|
/// <returns>JSON string presentation of the object</returns>
|
||
|
public virtual string ToJson()
|
||
|
{
|
||
|
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns true if objects are equal
|
||
|
/// </summary>
|
||
|
/// <param name="input">Object to be compared</param>
|
||
|
/// <returns>Boolean</returns>
|
||
|
public override bool Equals(object input)
|
||
|
{
|
||
|
return this.Equals(input as NcSkuDetail);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns true if NcSkuDetail instances are equal
|
||
|
/// </summary>
|
||
|
/// <param name="input">Instance of NcSkuDetail to be compared</param>
|
||
|
/// <returns>Boolean</returns>
|
||
|
public bool Equals(NcSkuDetail input)
|
||
|
{
|
||
|
if (input == null)
|
||
|
return false;
|
||
|
|
||
|
return
|
||
|
(
|
||
|
this.Code == input.Code ||
|
||
|
(this.Code != null &&
|
||
|
this.Code.Equals(input.Code))
|
||
|
) &&
|
||
|
(
|
||
|
this.ParentCode == input.ParentCode ||
|
||
|
(this.ParentCode != null &&
|
||
|
this.ParentCode.Equals(input.ParentCode))
|
||
|
) &&
|
||
|
(
|
||
|
this.Tjnum == input.Tjnum ||
|
||
|
(this.Tjnum != null &&
|
||
|
this.Tjnum.Equals(input.Tjnum))
|
||
|
) &&
|
||
|
(
|
||
|
this.Detail == input.Detail ||
|
||
|
this.Detail != null &&
|
||
|
this.Detail.SequenceEqual(input.Detail)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets the hash code
|
||
|
/// </summary>
|
||
|
/// <returns>Hash code</returns>
|
||
|
public override int GetHashCode()
|
||
|
{
|
||
|
unchecked // Overflow is fine, just wrap
|
||
|
{
|
||
|
int hashCode = 41;
|
||
|
if (this.Code != null)
|
||
|
hashCode = hashCode * 59 + this.Code.GetHashCode();
|
||
|
if (this.ParentCode != null)
|
||
|
hashCode = hashCode * 59 + this.ParentCode.GetHashCode();
|
||
|
if (this.Tjnum != null)
|
||
|
hashCode = hashCode * 59 + this.Tjnum.GetHashCode();
|
||
|
if (this.Detail != null)
|
||
|
hashCode = hashCode * 59 + this.Detail.GetHashCode();
|
||
|
return hashCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// To validate all properties of the instance
|
||
|
/// </summary>
|
||
|
/// <param name="validationContext">Validation context</param>
|
||
|
/// <returns>Validation Result</returns>
|
||
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||
|
{
|
||
|
yield break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|