Ken 1 week ago
parent
commit
af75d08d80
1 changed files with 1 additions and 28 deletions
  1. 1 28
      app/Models/Collect.php

+ 1 - 28
app/Models/Collect.php

@@ -1,25 +1,8 @@
 <?php
-
 namespace App\Models;
-
-use App\Constants\HttpStatus;
-use App\Constants\Util;
-use Illuminate\Foundation\Auth\User as Authenticatable;
-
-use Illuminate\Notifications\Notifiable;
-use Laravel\Sanctum\HasApiTokens;
-use Illuminate\Database\Eloquent\Builder;
-
-/**
- * @mixin Builder
- * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
- */
-class Collect extends Authenticatable
+class Collect extends BaseModel
 {
-    use HasApiTokens, Notifiable;
-
     protected $table = 'collects';
-    protected $hidden = ['created_at', 'updated_at'];
     // ✅ 允许批量赋值的字段
     protected $fillable = [
         'from_address',
@@ -46,14 +29,4 @@ class Collect extends Authenticatable
         2 => '已确认',
         3 => '失败',
     ];
-
-    protected function getCreatedAtAttribute($value)
-    {
-        return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
-    }
-
-    protected function getUpdatedAtAttribute($value)
-    {
-        return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
-    }
 }