pool/web/yaamp/models/db_coinsModel.php
Tanguy Pruvot bb31cec957 dos2unix all files, we are on linux
trim them, btw... its important to start on a clean base...
2015-07-12 04:40:50 +02:00

46 lines
592 B
PHP

<?php
class db_coins extends CActiveRecord
{
public static function model($className=__CLASS__)
{
return parent::model($className);
}
public function tableName()
{
return 'coins';
}
public function rules()
{
return array(
array('name', 'required'),
array('symbol', 'required'),
array('symbol', 'unique'),
);
}
public function relations()
{
return array(
);
}
public function attributeLabels()
{
return array(
);
}
public function getSymbol_show()
{
if(!empty($this->symbol2))
return $this->symbol2;
else
return $this->symbol;
}
}