articleinfo.cs

来自「这个版本(InteliIM Open Kernel Release 2)是目前最」· CS 代码 · 共 157 行

CS
157
字号
namespace Org.InteliIM.Applications.Tourism
{
	/// <summary>
	/// Represents an article.
	/// </summary>
	public class ArticleInfo: IDiscountable
	{
		private string id;
		
		/// <summary>
		/// Gets or sets the id.
		/// </summary>
		public string Id
		{
			get
			{
				if(this.id == null)
					this.id = "";
				
				return this.id;
			}
			set
			{
				this.id = value;
			}
		}
		
		private string name;
		
		/// <summary>
		/// Gets or sets the name.
		/// </summary>
		public string Name
		{
			get
			{
				if(this.name == null)
					this.name ="";
				
				return this.name;
			}
			set
			{
				this.name = value;
			}
		}
		
		private string description;
		
		/// <summary>
		/// Gets or sets the description.
		/// </summary>
		public string Description
		{
			get
			{
				if(this.description == null)
					this.description = "";
				
				return this.description;
			}
			set
			{
				this.description = value;
			}
		}
		
		private float price = 0.0f;
		
		/// <summary>
		/// Gets or sets the price.
		/// </summary>
		public float Price
		{
			get
			{
				return this.price;
			}
			set
			{
				this.price = value;
			}
		}
		
		private ArticleType type;
		
		/// <summary>
		/// Gets or sets the type.
		/// </summary>
		public ArticleType Type
		{
			get
			{
				if(this.type == null)
					this.type = new ArticleType();
				
				return this.type;
			}
			set
			{
				this.type = value;
			}
		}
		
		private float discountRatio = 1.0f;
		
		/// <summary>
		/// Gets or sets the discount ratio.
		/// </summary>
		public float DiscountRatio
		{
			get
			{
				return this.discountRatio;
			}
			set
			{
				this.discountRatio = value;
			}
		}
		
		private bool requireStock = true;
		
		/// <summary>
		/// Gets or sets the require stock.
		/// </summary>
		public bool RequireStock
		{
			get
			{
				return this.requireStock;
			}
			set
			{
				this.requireStock = value;
			}
		}
		
		private long stockpile = 0;
		
		/// <summary>
		/// Gets or sets the stockpile.
		/// </summary>
		public long Stockpile
		{
			get
			{
				return this.stockpile;
			}
			set
			{
				this.stockpile = value;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?