VideoContributionRecord.php 655 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. /**
  5. * 会员模型
  6. */
  7. class VideoContributionRecord extends Model
  8. {
  9. // 表名
  10. protected $name = 'video_contribution_record';
  11. // 开启自动写入时间戳字段
  12. protected $autoWriteTimestamp = 'int';
  13. // 定义时间戳字段名
  14. protected $createTime = 'createtime';
  15. // 追加属性
  16. protected $append = [];
  17. public function user()
  18. {
  19. return $this->belongsTo('User', 'uid', 'id', [], 'LEFT')->setEagerlyType(0);
  20. }
  21. public function videolist()
  22. {
  23. return $this->belongsTo('Videolist', 'vid', 'id', [], 'LEFT')->setEagerlyType(0);
  24. }
  25. }