'integer', 'enabled' => 'integer', 'created_at' => 'integer', 'updated_at' => 'integer', 'deleted_at' => 'integer', ]; public function createds(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(Admin::class, 'id', 'created_by')->select('id', 'real_name as created_name'); } public function updateds(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(Admin::class, 'id', 'updated_by')->select('id', 'real_name as updated_name'); } public function getExpiredDateAttribute(): ?string { $timestamp = $this->getRawOriginal('expired_at'); if (empty($timestamp)) { return null; } return \Carbon\Carbon::createFromTimestamp((int)$timestamp) ->setTimezone(config('app.default_timezone')) ->format('Y-m-d H:i:s'); } public function getCreatedNameAttribute(): string { return $this->createds?->created_name ?? ''; } public function getUpdatedNameAttribute(): string { return $this->updateds?->updated_name ?? ''; } }