LhcOrder.php 1.6 KB

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