初始化
This commit is contained in:
40
addons/webman/model/ChannelRechargeMethodLang.php
Normal file
40
addons/webman/model/ChannelRechargeMethodLang.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace addons\webman\model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* Class ChannelRechargeMethodLang
|
||||
* @property int id 主键
|
||||
* @property string lang 语言标识
|
||||
* @property string name 姓名
|
||||
* @property int method_id 充值方式
|
||||
* @property string bank_name 银行
|
||||
* @property string sub_bank 支行
|
||||
* @property string owner 户名
|
||||
*
|
||||
* @property ChannelRechargeMethod rechargeMethod
|
||||
* @package addons\webman\model
|
||||
*/
|
||||
class ChannelRechargeMethodLang extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $fillable = ['lang', 'name', 'method_id', 'bank_name', 'sub_bank', 'owner'];
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
|
||||
$this->setTable(plugin()->webman->config('database.channel_recharge_method_lang_table'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值方式
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function rechargeMethod(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(plugin()->webman->config('database.channel_recharge_method_model'), 'method_id')->withTrashed();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user