League.php 676 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class League extends BaseModel
  5. {
  6. protected $table = 'leagues';
  7. protected $fillable = ['league_id', 'name', 'type', 'logo', 'country_name', 'country_code', 'country_flag', 'seasons', 'is_active', 'last_synced_at'];
  8. protected $casts = [
  9. 'seasons' => 'array',
  10. ];
  11. const IS_ACTIVE_YES = 1;
  12. const IS_ACTIVE_NOT = 0;
  13. // 五大联赛
  14. public static $TOP_FIVE_LEAGUE_IDS = [
  15. 39 => 'Premier League', // 英超
  16. 71 => 'Serie A', // 意甲
  17. 140 => 'La Liga', // 西甲
  18. 78 => 'Bundesliga', // 德甲
  19. 61 => 'Ligue 1', // 法甲
  20. ];
  21. }