|
|
@@ -0,0 +1,36 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\common\model;
|
|
|
+
|
|
|
+use think\Model;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 会员模型
|
|
|
+ */
|
|
|
+class VideoUser extends Model
|
|
|
+{
|
|
|
+ // 表名
|
|
|
+ protected $name = 'video_user';
|
|
|
+ // 开启自动写入时间戳字段
|
|
|
+ protected $autoWriteTimestamp = 'int';
|
|
|
+ // 定义时间戳字段名
|
|
|
+ protected $createTime = 'createtime';
|
|
|
+ protected $updateTime = 'updatetime';
|
|
|
+ // 追加属性
|
|
|
+ protected $append = [
|
|
|
+
|
|
|
+ ];
|
|
|
+ // 定义关联关系
|
|
|
+ public function videolist()
|
|
|
+ {
|
|
|
+ return $this->belongsTo('Videolist', 'vid', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
|
+ }
|
|
|
+ public function platform()
|
|
|
+ {
|
|
|
+ return $this->belongsTo('Platform', 'platform_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
|
+ }
|
|
|
+ public function user()
|
|
|
+ {
|
|
|
+ return $this->belongsTo('User', 'uid', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
|
+ }
|
|
|
+}
|