RaffleLog.php 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace plugin\admin\app\model;
  3. use plugin\admin\app\model\Base;
  4. /**
  5. * @property integer $id (主键)
  6. * @property integer $num 邀请人数
  7. * @property integer $money 奖励
  8. * @property string $grade_name 等级名称
  9. * @property integer $sort 排序
  10. * @property integer $status 状态 0 禁用 1正常
  11. */
  12. class RaffleLog extends Base
  13. {
  14. /**
  15. * The table associated with the model.
  16. *
  17. * @var string
  18. */
  19. protected $table = 'wa_raffle_log';
  20. /**
  21. * The primary key associated with the table.
  22. *
  23. * @var string
  24. */
  25. protected $primaryKey = 'id';
  26. /**
  27. * Indicates if the model should be timestamped.
  28. *
  29. * @var bool
  30. */
  31. public $timestamps = false;
  32. public function userData()
  33. {
  34. return $this->hasOne(User::class,'id','user_id');
  35. }
  36. public function raffle()
  37. {
  38. return $this->hasOne(Raffle::class,'id','raffle_id');
  39. }
  40. }