*/ protected $fillable = [ 'relate_order_id', 'relate_patient_id', 'dept_id', 'dept_name', 'doctor_id', 'doctor_name', 'visit_date', 'total_amount', 'pre_settle_status', 'pre_settle_at', 'cancel_pre_settle_at', 'extra_info', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'id' => 'integer', 'relate_order_id' => 'integer', 'relate_patient_id' => 'integer', 'total_amount' => 'integer', ]; /** * Relationships Order. */ public function order(): BelongsTo { return $this->belongsTo(Order::class, 'relate_order_id'); } /** * Relationships Patient. */ public function patient(): BelongsTo { return $this->belongsTo(Patient::class, 'relate_patient_id'); } }