2025-04-21 14:10:27 +08:00

211 lines
7.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 后台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>
/// OutStockGoodsResp
/// </summary>
[DataContract]
public partial class OutStockGoodsResp : IEquatable<OutStockGoodsResp>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="OutStockGoodsResp" /> class.
/// </summary>
/// <param name="code">物料编码.</param>
/// <param name="oldName">物料旧编码.</param>
/// <param name="name">物料名.</param>
/// <param name="unitPirce">单价.</param>
/// <param name="qty">数量.</param>
/// <param name="isSelfUseProduct">1:是自用品 0不是自用品.</param>
public OutStockGoodsResp(string code = default(string), string oldName = default(string), string name = default(string), double? unitPirce = default(double?), double? qty = default(double?), int? isSelfUseProduct = default(int?))
{
this.Code = code;
this.OldName = oldName;
this.Name = name;
this.UnitPirce = unitPirce;
this.Qty = qty;
this.IsSelfUseProduct = isSelfUseProduct;
}
/// <summary>
/// 物料编码
/// </summary>
/// <value>物料编码</value>
[DataMember(Name="code", EmitDefaultValue=false)]
public string Code { get; set; }
/// <summary>
/// 物料旧编码
/// </summary>
/// <value>物料旧编码</value>
[DataMember(Name="oldName", EmitDefaultValue=false)]
public string OldName { get; set; }
/// <summary>
/// 物料名
/// </summary>
/// <value>物料名</value>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// 单价
/// </summary>
/// <value>单价</value>
[DataMember(Name="unitPirce", EmitDefaultValue=false)]
public double? UnitPirce { get; set; }
/// <summary>
/// 数量
/// </summary>
/// <value>数量</value>
[DataMember(Name="qty", EmitDefaultValue=false)]
public double? Qty { get; set; }
/// <summary>
/// 1:是自用品 0不是自用品
/// </summary>
/// <value>1:是自用品 0不是自用品</value>
[DataMember(Name="isSelfUseProduct", EmitDefaultValue=false)]
public int? IsSelfUseProduct { 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 OutStockGoodsResp {\n");
sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append(" OldName: ").Append(OldName).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" UnitPirce: ").Append(UnitPirce).Append("\n");
sb.Append(" Qty: ").Append(Qty).Append("\n");
sb.Append(" IsSelfUseProduct: ").Append(IsSelfUseProduct).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 OutStockGoodsResp);
}
/// <summary>
/// Returns true if OutStockGoodsResp instances are equal
/// </summary>
/// <param name="input">Instance of OutStockGoodsResp to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(OutStockGoodsResp input)
{
if (input == null)
return false;
return
(
this.Code == input.Code ||
(this.Code != null &&
this.Code.Equals(input.Code))
) &&
(
this.OldName == input.OldName ||
(this.OldName != null &&
this.OldName.Equals(input.OldName))
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.UnitPirce == input.UnitPirce ||
(this.UnitPirce != null &&
this.UnitPirce.Equals(input.UnitPirce))
) &&
(
this.Qty == input.Qty ||
(this.Qty != null &&
this.Qty.Equals(input.Qty))
) &&
(
this.IsSelfUseProduct == input.IsSelfUseProduct ||
(this.IsSelfUseProduct != null &&
this.IsSelfUseProduct.Equals(input.IsSelfUseProduct))
);
}
/// <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.OldName != null)
hashCode = hashCode * 59 + this.OldName.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.UnitPirce != null)
hashCode = hashCode * 59 + this.UnitPirce.GetHashCode();
if (this.Qty != null)
hashCode = hashCode * 59 + this.Qty.GetHashCode();
if (this.IsSelfUseProduct != null)
hashCode = hashCode * 59 + this.IsSelfUseProduct.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;
}
}
}