|
@@ -1,23 +1,10 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
|
|
-
|
|
|
|
|
namespace App\Models;
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
-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 Bet extends Authenticatable
|
|
|
|
|
|
|
+class Bet extends BaseModel
|
|
|
{
|
|
{
|
|
|
- use HasApiTokens, Notifiable;
|
|
|
|
|
protected $table = 'bets';
|
|
protected $table = 'bets';
|
|
|
- // protected $hidden = ['created_at', 'updated_at'];
|
|
|
|
|
protected $fillable = ['issue_no', 'keywords', 'amount', 'odds', 'status', 'profit', 'issue_id', 'member_id', 'user_id'];
|
|
protected $fillable = ['issue_no', 'keywords', 'amount', 'odds', 'status', 'profit', 'issue_id', 'member_id', 'user_id'];
|
|
|
|
|
|
|
|
const STATUS_STAY = 1;
|
|
const STATUS_STAY = 1;
|
|
@@ -54,24 +41,4 @@ class Bet extends Authenticatable
|
|
|
return $array[$val];
|
|
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');
|
|
|
|
|
- // }
|
|
|
|
|
}
|
|
}
|