123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Newtonsoft.Json.Linq;
- using System;
- public class AuctionItemModel
- {
- /// <summary>
- /// 拍品uid,这是 uid
- /// </summary>
- public int itemid { get; set; }
- /**
- * 分区id
- * @var type
- */
- public int zoneid { get; set; }
- /**
- * 物品内容
- * @var string "itemid,num;itemid,num;..."
- */
- public string contents { get; set; } /// 物品内容
-
- /**
- * 消耗类型----废弃
- * @var type
- */
- public int costType{ get; set; }/// 消耗类型
- /**
- * 起拍价
- * @var int
- */
- public int startprice{ get; set; }
- /// <summary>
- /// 一口价
- /// </summary>
- public int buyoutPrice { get; set; }
- /**
- * 加价幅度(每次加价不得低于加价幅度,高于加价幅度可以自由出价)
- * @var int
- */
- public int addstep { get; set; }
- /**
- * 标签1
- * @var type
- */
- public string tag1 { get; set; } //标签1
- /**
- * 标签2
- * @var type
- */
- public string tag2 { get; set; } //标签2
- // ---- 运行时字段 -----
- /**
- * 开始时间
- * @var int
- */
- public int startts { get; set; }
- /**
- * 结束时间
- * @var int
- */
- public int endts { get; set; }
- public string sellerid { get; set; } /// 卖家ID
- public string sellername { get; set; } /// 卖家昵称
- /**
- *
- * 竞价历史
- * @var object:{ts:{oid:"",name:"",price:""},ts2:{...}}
- */
- public string auchistory { get; set; }
- /**
- * 当前最高出价
- * @var int
- */
- public int currprice { get; set; }
- public string currpeopleid { get; set; } /// 当前最高价者ID
- public string currpeoplename { get; set; } /// 当前最高价者昵称
- public string result { get; set; } ///拍卖结果, 结算以后会有:成交,流拍
-
- /// <summary>
- /// 拍品id
- /// </summary>
- public int id
- {
- get
- {
- if (this.contents != string.Empty)
- {
- string[] sList = this.contents.Split(',');
- return int.Parse(sList[0]);
- }
- return 0;
- }
- }
- /// <summary>
- /// 拍品id--num
- /// </summary>
- public int num
- {
- get
- {
- if (this.contents != string.Empty)
- {
- string[] sList = this.contents.Split(',');
- return int.Parse(sList[1]);
- }
- return 0;
- }
- }
- /// <summary>
- /// 拍品mo
- /// </summary>
- public sm_item_base itemMo
- {
- get
- {
- return sm_item_base.GetMoById(this.id);
- }
- }
- /// <summary>
- /// 竞拍中的标志 true:有该标志
- /// </summary>
- public bool isAuctionIng
- {
- get
- {
- if (this.currpeopleid != string.Empty)
- {
- return true;
- }
- return false;
- }
- }
- /// <summary>
- /// 最新出价是否是自己;true:是自己,false:不是自己是别人
- /// </summary>
- public bool isfirst
- {
- get
- {
- if (this.currpeopleid == UserProxy.Instance.player.uid)
- {
- return true;
- }
- return false;
- }
- }
- public void Initlize(JToken data)
- {
- Utils.LoadObject(data, this);
- }
- }
|