*/ protected $fillable = [ 'relate_id', 'relate_order_id', 'dept_id', 'dept_name', 'doctor_id', 'doctor_name', 'recharge_amount', 'extra_info', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'id' => 'integer', 'relate_id' => 'integer', 'relate_order_id' => 'integer', 'recharge_amount' => 'integer', ]; /** * Relationships Order. */ public function order(): BelongsTo { return $this->belongsTo(Order::class, 'relate_order_id'); } /** * Relationships Inpatient. */ public function inpatient(): BelongsTo { return $this->belongsTo(Inpatient::class, 'relate_id'); } }