/* * 后台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 { /// /// 直营销售订单项 /// [DataContract] public partial class CreateDirectShopOrderItem : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// 编码. /// 0:正常 1:是退货. /// 产品名. /// 单价,折后价. /// 吊牌单价. /// 吊牌总价. /// 小计,小计价格应该要准确。折扣总价。. /// 数量. /// 是不是服务 0:不是 1:是. /// 是否是赠品 0:不是 1:是. public CreateDirectShopOrderItem(string code = default(string), int? isRefund = default(int?), string name = default(string), double? unitPrice = default(double?), double? oriUnitPrice = default(double?), double? origAmount = default(double?), double? totalAmount = default(double?), double? qty = default(double?), int? isService = default(int?), int? isGift = default(int?)) { this.Code = code; this.IsRefund = isRefund; this.Name = name; this.UnitPrice = unitPrice; this.OriUnitPrice = oriUnitPrice; this.OrigAmount = origAmount; this.TotalAmount = totalAmount; this.Qty = qty; this.IsService = isService; this.IsGift = isGift; } /// /// 编码 /// /// 编码 [DataMember(Name="code", EmitDefaultValue=false)] public string Code { get; set; } /// /// 0:正常 1:是退货 /// /// 0:正常 1:是退货 [DataMember(Name="isRefund", EmitDefaultValue=false)] public int? IsRefund { get; set; } /// /// 产品名 /// /// 产品名 [DataMember(Name="name", EmitDefaultValue=false)] public string Name { get; set; } /// /// 单价,折后价 /// /// 单价,折后价 [DataMember(Name="unitPrice", EmitDefaultValue=false)] public double? UnitPrice { get; set; } /// /// 吊牌单价 /// /// 吊牌单价 [DataMember(Name="oriUnitPrice", EmitDefaultValue=false)] public double? OriUnitPrice { get; set; } /// /// 吊牌总价 /// /// 吊牌总价 [DataMember(Name="origAmount", EmitDefaultValue=false)] public double? OrigAmount { get; set; } /// /// 小计,小计价格应该要准确。折扣总价。 /// /// 小计,小计价格应该要准确。折扣总价。 [DataMember(Name="totalAmount", EmitDefaultValue=false)] public double? TotalAmount { get; set; } /// /// 数量 /// /// 数量 [DataMember(Name="qty", EmitDefaultValue=false)] public double? Qty { get; set; } /// /// 是不是服务 0:不是 1:是 /// /// 是不是服务 0:不是 1:是 [DataMember(Name="isService", EmitDefaultValue=false)] public int? IsService { get; set; } /// /// 是否是赠品 0:不是 1:是 /// /// 是否是赠品 0:不是 1:是 [DataMember(Name="isGift", EmitDefaultValue=false)] public int? IsGift { 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 CreateDirectShopOrderItem {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" IsRefund: ").Append(IsRefund).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" UnitPrice: ").Append(UnitPrice).Append("\n"); sb.Append(" OriUnitPrice: ").Append(OriUnitPrice).Append("\n"); sb.Append(" OrigAmount: ").Append(OrigAmount).Append("\n"); sb.Append(" TotalAmount: ").Append(TotalAmount).Append("\n"); sb.Append(" Qty: ").Append(Qty).Append("\n"); sb.Append(" IsService: ").Append(IsService).Append("\n"); sb.Append(" IsGift: ").Append(IsGift).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 CreateDirectShopOrderItem); } /// /// Returns true if CreateDirectShopOrderItem instances are equal /// /// Instance of CreateDirectShopOrderItem to be compared /// Boolean public bool Equals(CreateDirectShopOrderItem input) { if (input == null) return false; return ( this.Code == input.Code || (this.Code != null && this.Code.Equals(input.Code)) ) && ( this.IsRefund == input.IsRefund || (this.IsRefund != null && this.IsRefund.Equals(input.IsRefund)) ) && ( this.Name == input.Name || (this.Name != null && this.Name.Equals(input.Name)) ) && ( this.UnitPrice == input.UnitPrice || (this.UnitPrice != null && this.UnitPrice.Equals(input.UnitPrice)) ) && ( this.OriUnitPrice == input.OriUnitPrice || (this.OriUnitPrice != null && this.OriUnitPrice.Equals(input.OriUnitPrice)) ) && ( this.OrigAmount == input.OrigAmount || (this.OrigAmount != null && this.OrigAmount.Equals(input.OrigAmount)) ) && ( this.TotalAmount == input.TotalAmount || (this.TotalAmount != null && this.TotalAmount.Equals(input.TotalAmount)) ) && ( this.Qty == input.Qty || (this.Qty != null && this.Qty.Equals(input.Qty)) ) && ( this.IsService == input.IsService || (this.IsService != null && this.IsService.Equals(input.IsService)) ) && ( this.IsGift == input.IsGift || (this.IsGift != null && this.IsGift.Equals(input.IsGift)) ); } /// /// 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.IsRefund != null) hashCode = hashCode * 59 + this.IsRefund.GetHashCode(); if (this.Name != null) hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.UnitPrice != null) hashCode = hashCode * 59 + this.UnitPrice.GetHashCode(); if (this.OriUnitPrice != null) hashCode = hashCode * 59 + this.OriUnitPrice.GetHashCode(); if (this.OrigAmount != null) hashCode = hashCode * 59 + this.OrigAmount.GetHashCode(); if (this.TotalAmount != null) hashCode = hashCode * 59 + this.TotalAmount.GetHashCode(); if (this.Qty != null) hashCode = hashCode * 59 + this.Qty.GetHashCode(); if (this.IsService != null) hashCode = hashCode * 59 + this.IsService.GetHashCode(); if (this.IsGift != null) hashCode = hashCode * 59 + this.IsGift.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }