1
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use app\model\Base;
|
||||
/**
|
||||
* @property integer $id 主键(ID) - 无注释
|
||||
* @property integer $user_id 用户ID
|
||||
* @property integer $gift_id 产品ID
|
||||
* @property integer $quantity 购买数量
|
||||
* @property float $amount 总价
|
||||
* @property integer $denomination 面值
|
||||
* @property string $cdkey 兑换码
|
||||
* @property string $memo CDKEY
|
||||
* @property integer $status 状态
|
||||
* @property integer $created_at 创建时间
|
||||
* @property integer $updated_at 更新时间
|
||||
*/
|
||||
class GiftOrder extends Base
|
||||
{
|
||||
public function gift()
|
||||
{
|
||||
return $this->belongsTo('Gift', 'gift_id', 'id');//->setEagerlyType(0);
|
||||
}
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('User', 'user_id', 'id');//->setEagerlyType(0);
|
||||
}
|
||||
function getStatusList(){
|
||||
return [
|
||||
'0' => '兑换中',
|
||||
'1' => '成功',
|
||||
'-1' => '失败',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user