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