'integer', 'gender' => 'integer', 'birthday' => 'datetime', 'created_at' => 'datetime', 'state' => 'integer', 'is_vip' => 'integer', 'vip_time' => 'timestamp', 'level' => 'integer', 'score' => 'float', 'work_status' => 'integer', 'virtual_order' => 'integer', 'total_income' => 'decimal:2', 'total_expense' => 'decimal:2', 'total_balance' => 'decimal:2', 'available_balance' => 'decimal:2', 'frozen_amount' => 'decimal:2', 'avatar' => 'array', 'qual_photo' => 'array', 'business_license' => 'array', 'health_certificate' => 'array', 'id_card_front_photo' => 'array', 'id_card_back_photo' => 'array', 'formal_photo' => 'string', 'health_cert' => 'array', ]; protected $appends = [ 'state_text', 'level_text', 'work_status_text', ]; public function getStateTextAttribute() { return is_null($this->state) ? null : TechnicianStatus::fromValue($this->state)?->label(); } public function getLevelTextAttribute() { return is_null($this->level) ? null : TechnicianLevel::fromValue($this->level)?->label(); } public function getWorkStatusTextAttribute() { return is_null($this->work_status) ? null : TechnicianWorkStatus::fromValue($this->work_status)?->label(); } }