SignRecord.php 607 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace plugin\admin\app\model;
  3. use app\controller\GoodsController;
  4. use plugin\admin\app\model\Base;
  5. class SignRecord extends Base
  6. {
  7. /**
  8. * The table associated with the model.
  9. *
  10. * @var string
  11. */
  12. protected $table = 'wa_sign_record';
  13. /**
  14. * The primary key associated with the table.
  15. *
  16. * @var string
  17. */
  18. protected $primaryKey = 'id';
  19. public function userData()
  20. {
  21. return $this->hasOne(User::class,'id','uid');
  22. }
  23. public function goodsData()
  24. {
  25. return $this->hasOne(Good::class,'id','goods_id');
  26. }
  27. }