<?php

namespace app\common\model;

use app\common\model\traits\TimestampInteger;
use support\think\Model;

/**
 * MallRedemptionOrder
 */
class MallRedemptionOrder extends Model
{
    use TimestampInteger;

    // 表名
    protected $name = 'mall_redemption_order';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;


    public function playxUserAsset(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\common\model\MallUserAsset::class, 'playx_user_asset_id', 'id');
    }

    public function mallItem(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\common\model\MallItem::class, 'mall_item_id', 'id');
    }
}