/*
* 后台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
{
///
/// NcSkuDetailInfo
///
[DataContract]
public partial class NcSkuDetailInfo : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// 编码.
/// 色号.
/// 条形码.
/// 吊牌价.
/// 旧编码.
public NcSkuDetailInfo(string code = default(string), string color = default(string), string txm = default(string), double? price = default(double?), string oldcode = default(string))
{
this.Code = code;
this.Color = color;
this.Txm = txm;
this.Price = price;
this.Oldcode = oldcode;
}
///
/// 编码
///
/// 编码
[DataMember(Name="code", EmitDefaultValue=false)]
public string Code { get; set; }
///
/// 色号
///
/// 色号
[DataMember(Name="color", EmitDefaultValue=false)]
public string Color { get; set; }
///
/// 条形码
///
/// 条形码
[DataMember(Name="txm", EmitDefaultValue=false)]
public string Txm { get; set; }
///
/// 吊牌价
///
/// 吊牌价
[DataMember(Name="price", EmitDefaultValue=false)]
public double? Price { get; set; }
///
/// 旧编码
///
/// 旧编码
[DataMember(Name="oldcode", EmitDefaultValue=false)]
public string Oldcode { 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 NcSkuDetailInfo {\n");
sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append(" Color: ").Append(Color).Append("\n");
sb.Append(" Txm: ").Append(Txm).Append("\n");
sb.Append(" Price: ").Append(Price).Append("\n");
sb.Append(" Oldcode: ").Append(Oldcode).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 NcSkuDetailInfo);
}
///
/// Returns true if NcSkuDetailInfo instances are equal
///
/// Instance of NcSkuDetailInfo to be compared
/// Boolean
public bool Equals(NcSkuDetailInfo input)
{
if (input == null)
return false;
return
(
this.Code == input.Code ||
(this.Code != null &&
this.Code.Equals(input.Code))
) &&
(
this.Color == input.Color ||
(this.Color != null &&
this.Color.Equals(input.Color))
) &&
(
this.Txm == input.Txm ||
(this.Txm != null &&
this.Txm.Equals(input.Txm))
) &&
(
this.Price == input.Price ||
(this.Price != null &&
this.Price.Equals(input.Price))
) &&
(
this.Oldcode == input.Oldcode ||
(this.Oldcode != null &&
this.Oldcode.Equals(input.Oldcode))
);
}
///
/// 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.Color != null)
hashCode = hashCode * 59 + this.Color.GetHashCode();
if (this.Txm != null)
hashCode = hashCode * 59 + this.Txm.GetHashCode();
if (this.Price != null)
hashCode = hashCode * 59 + this.Price.GetHashCode();
if (this.Oldcode != null)
hashCode = hashCode * 59 + this.Oldcode.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}