using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json.Linq;
using System;
public class AuctionItemModel
{
///
/// 拍品uid,这是 uid
///
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; }
///
/// 一口价
///
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; } ///拍卖结果, 结算以后会有:成交,流拍
///
/// 拍品id
///
public int id
{
get
{
if (this.contents != string.Empty)
{
string[] sList = this.contents.Split(',');
return int.Parse(sList[0]);
}
return 0;
}
}
///
/// 拍品id--num
///
public int num
{
get
{
if (this.contents != string.Empty)
{
string[] sList = this.contents.Split(',');
return int.Parse(sList[1]);
}
return 0;
}
}
///
/// 拍品mo
///
public sm_item_base itemMo
{
get
{
return sm_item_base.GetMoById(this.id);
}
}
///
/// 竞拍中的标志 true:有该标志
///
public bool isAuctionIng
{
get
{
if (this.currpeopleid != string.Empty)
{
return true;
}
return false;
}
}
///
/// 最新出价是否是自己;true:是自己,false:不是自己是别人
///
public bool isfirst
{
get
{
if (this.currpeopleid == UserProxy.Instance.player.uid)
{
return true;
}
return false;
}
}
public void Initlize(JToken data)
{
Utils.LoadObject(data, this);
}
}