| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Module\Fund\Models;
- use UCore\ModelCore;
- /**
- * 账户种类配置表
- *
- * 用于存储系统支持的各种账户种类,如可用账户、冻结账户等。
- * 同一个币种(FundCurrencyModel)可以有多个不同的账户种类。
- *
- * field start
- * @property int $id 自增
- * @property string $name 资金名字
- * @property int $currency_id 关联的币种ID,外键关联kku_fund_currency表
- * @property int $create_time
- * @property int $update_time 更新时间
- * field end
- */
- class FundConfigModel extends ModelCore
- {
- protected $table = 'fund_config';
- // attrlist start
- protected $fillable = [
- 'id',
- 'name',
- 'currency_id',
- 'create_time',
- 'update_time',
- ];
- // attrlist end
- public $timestamps = false;
- /**
- * 获取关联的币种
- *
- * 一个账户种类属于一个币种,这是一对多关系中的"多"一方
- *
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
- */
- public function currency()
- {
- return $this->belongsTo(FundCurrencyModel::class, 'currency_id');
- }
- }
|