Ken 1 тиждень тому
батько
коміт
23ca422223
1 змінених файлів з 1 додано та 35 видалено
  1. 1 35
      app/Models/Issue.php

+ 1 - 35
app/Models/Issue.php

@@ -1,23 +1,9 @@
 <?php
-
 namespace App\Models;
-
 use App\Services\IssueService;
-use Illuminate\Database\Eloquent\Builder;
-use Illuminate\Foundation\Auth\User as Authenticatable;
-use Illuminate\Notifications\Notifiable;
-use Laravel\Sanctum\HasApiTokens;
-
-/**
- * Bet
- * @mixin Builder
- * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
- */
-class Issue extends Authenticatable
+class Issue extends BaseModel
 {
-    use HasApiTokens, Notifiable;
     protected $table = 'issues';
-    // protected $hidden = ['created_at', 'updated_at'];
     protected $fillable = ['issue_no', 'start_time', 'end_time', 'winning_numbers', 'status', 'combo', 'extreme', 'image'];
     protected $appends = [
         'award',
@@ -83,24 +69,4 @@ class Issue extends Authenticatable
             return $array[$val];
         }
     }
-
-    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');
-    }
-
-    // public function children()
-    // {
-    //     return $this->hasMany(Menu::class, 'parent_id');
-    // }
-
-    // public function parent()
-    // {
-    //     return $this->belongsTo(Menu::class, 'parent_id');
-    // }
 }