LhcOrder.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Models;
  3. use App\Models\LhcLottery;
  4. class LhcOrder extends BaseModel
  5. {
  6. protected $table = 'lhc_order';
  7. protected $fillable = ['issue','ordernum','member_id','game','gameplay','number','odds','amount','lottery_status','win_amount','profit_and_loss','is_faker','remark','type'];
  8. protected $hidden = [];
  9. public $timestamps = true;
  10. protected $dateFormat = 'U'; // U 代表 UNIX 时间戳(int)
  11. public function lottery()
  12. {
  13. return $this->belongsTo(LhcLottery::class, 'issue', 'issue')
  14. ->select('issue', 'type', 'open_code', 'open_time', 'is_settlement');
  15. }
  16. public static function getRemark($type)
  17. {
  18. if ($type == 1) {
  19. return '新澳门六合彩';
  20. } elseif ($type == 2) {
  21. return '香港六合彩';
  22. } elseif ($type == 3) {
  23. return '澳门六合彩';
  24. } elseif ($type == 4) {
  25. return '极速六合彩';
  26. } elseif ($type == 5) {
  27. return '加拿大28';
  28. } elseif ($type == 6) {
  29. return '极速28';
  30. } elseif ($type == 7) {
  31. return '极速赛车';
  32. } elseif ($type == 8) {
  33. return '极速时时彩';
  34. } elseif ($type == 9) {
  35. return '极速飞艇';
  36. } elseif ($type == 10) {
  37. return 'SG时时彩';
  38. } elseif ($type == 11) {
  39. return 'SG飞艇';
  40. } elseif ($type == 12) {
  41. return '极速快3';
  42. } elseif ($type == 13) {
  43. return 'SG快3';
  44. }
  45. return '';
  46. }
  47. }