LhcOrder.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. const STATUS_STAY = 0; // 待开奖
  12. const STATUS_LOSS = 1; // 未中奖
  13. const STATUS_WIN = 2; // 已中奖
  14. const STATUS_REFUND = 3; // 已退款
  15. public function lottery()
  16. {
  17. return $this->belongsTo(LhcLottery::class, 'issue', 'issue')
  18. ->select('issue', 'type', 'open_code', 'open_time', 'is_settlement');
  19. }
  20. public static function getRemark($type)
  21. {
  22. if ($type == 1) {
  23. return '新澳门六合彩';
  24. } elseif ($type == 2) {
  25. return '香港六合彩';
  26. } elseif ($type == 3) {
  27. return '澳门六合彩';
  28. } elseif ($type == 4) {
  29. return '极速六合彩';
  30. } elseif ($type == 5) {
  31. return '加拿大28';
  32. } elseif ($type == 6) {
  33. return '极速28';
  34. } elseif ($type == 7) {
  35. return '极速赛车';
  36. } elseif ($type == 8) {
  37. return '极速时时彩';
  38. } elseif ($type == 9) {
  39. return '极速飞艇';
  40. } elseif ($type == 10) {
  41. return 'SG时时彩';
  42. } elseif ($type == 11) {
  43. return 'SG飞艇';
  44. } elseif ($type == 12) {
  45. return '极速快3';
  46. } elseif ($type == 13) {
  47. return 'SG快3';
  48. }
  49. return '';
  50. }
  51. }