diff --git a/app/Models/Ledger.php b/app/Models/Ledger.php index 1f34424..aad9820 100644 --- a/app/Models/Ledger.php +++ b/app/Models/Ledger.php @@ -19,11 +19,6 @@ class Ledger extends Model protected $attributes = [ 'new_customers' => 0, - 'ledger_status' => LedgerStatus::Pending, - ]; - - protected $casts = [ - 'ledger_status' => LedgerStatus::class, ]; protected $fillable = [ @@ -39,7 +34,6 @@ class Ledger extends Model 'expected_income', 'actual_income', 'photos', - 'ledger_status', ]; public function store(): BelongsTo diff --git a/app/Models/Reimbursement.php b/app/Models/Reimbursement.php index af50671..6460850 100644 --- a/app/Models/Reimbursement.php +++ b/app/Models/Reimbursement.php @@ -2,10 +2,6 @@ namespace App\Models; -use App\Contracts\Checkable; -use App\Enums\CheckStatus; -use App\Enums\ReimbursementStatus; -use App\Traits\HasCheckable; use App\Traits\HasDateTimeFormatter; use EloquentFilter\Filterable; use Illuminate\Database\Eloquent\Casts\Attribute; @@ -13,13 +9,9 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; -class Reimbursement extends Model implements Checkable +class Reimbursement extends Model { - use Filterable, HasDateTimeFormatter, HasFactory, HasCheckable; - - protected $casts = [ - 'check_status' => CheckStatus::class - ]; + use Filterable, HasDateTimeFormatter, HasFactory; protected $fillable = [ 'employee_id', @@ -27,7 +19,6 @@ class Reimbursement extends Model implements Checkable 'expense', 'reason', 'photos', - 'reimbursement_status', ]; public function employee(): BelongsTo @@ -40,14 +31,6 @@ class Reimbursement extends Model implements Checkable return $this->belongsTo(Keyword::class, 'reimbursement_type_id', 'key'); } - /** - * 是否是待审核 - */ - public function isPending(): bool - { - return $this->reimbursement_status === ReimbursementStatus::Pending; - } - protected function photos(): Attribute { return Attribute::make(