/* * 后台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 { /// /// OrderGoods /// [DataContract] public partial class OrderGoods : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// 商品编码. /// 下单数量. /// 出库数量. public OrderGoods(string code = default(string), double? orderQty = default(double?), double? stockQty = default(double?)) { this.Code = code; this.OrderQty = orderQty; this.StockQty = stockQty; } /// /// 商品编码 /// /// 商品编码 [DataMember(Name="code", EmitDefaultValue=false)] public string Code { get; set; } /// /// 下单数量 /// /// 下单数量 [DataMember(Name="orderQty", EmitDefaultValue=false)] public double? OrderQty { get; set; } /// /// 出库数量 /// /// 出库数量 [DataMember(Name="stockQty", EmitDefaultValue=false)] public double? StockQty { get; set; } /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class OrderGoods {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" OrderQty: ").Append(OrderQty).Append("\n"); sb.Append(" StockQty: ").Append(StockQty).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public virtual string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object input) { return this.Equals(input as OrderGoods); } /// /// Returns true if OrderGoods instances are equal /// /// Instance of OrderGoods to be compared /// Boolean public bool Equals(OrderGoods input) { if (input == null) return false; return ( this.Code == input.Code || (this.Code != null && this.Code.Equals(input.Code)) ) && ( this.OrderQty == input.OrderQty || (this.OrderQty != null && this.OrderQty.Equals(input.OrderQty)) ) && ( this.StockQty == input.StockQty || (this.StockQty != null && this.StockQty.Equals(input.StockQty)) ); } /// /// Gets the hash code /// /// Hash code 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.OrderQty != null) hashCode = hashCode * 59 + this.OrderQty.GetHashCode(); if (this.StockQty != null) hashCode = hashCode * 59 + this.StockQty.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }