pool/web/yaamp/models/db_marketsModel.php
Tanguy Pruvot 6d2ab6efa1 markets: attempt to handle LTC markets
for the test, i added (manually) a market record named "c-cex LTC"
with base_coin set to "LTC", you may have to disable any BTC market(s) for the coin

In this case, the coin BTC price/balance is computed, based on LTC price,
even if the database coin "BTC price" is under 1 sat.

require LTC to be enabled or... "watched" to also update LTC/BTC price

implemented for cryptopia, nova and c-cex, not bleutrade (DOGE only)

+ various small log fixes..
2016-04-28 18:51:23 +02:00

41 lines
602 B
PHP

<?php
class db_markets extends CActiveRecord
{
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName()
{
return 'markets';
}
public function rules()
{
return array(
);
}
public function relations()
{
return array(
);
}
public function attributeLabels()
{
return array(
);
}
public function save($runValidation=true,$attributes=null)
{
if (empty($this->base_coin)) $this->base_coin = null;
if (empty($this->message)) $this->message = null;
return parent::save($runValidation, $attributes);
}
}