FUND_TYPE::class, 'display_attributes' => FundDisplayAttributesCast::class, ]; /** * 获取关联的币种 * * 一个账户种类属于一个币种,这是一对多关系中的"多"一方 * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function currency() { return $this->belongsTo(FundCurrencyModel::class, 'currency_id'); } /** * 获取显示属性 * * @return FundDisplayAttributesCast|null */ public function getDisplayAttributes(): ?FundDisplayAttributesCast { return $this->display_attributes; } /** * 设置显示属性 * * @param array|FundDisplayAttributesCast $attributes * @return $this */ public function setDisplayAttributes($attributes) { $this->display_attributes = $attributes; return $this; } }