WIN-2308041133\Administrator 8 months ago
parent
commit
e94df6abf6
1 changed files with 29 additions and 0 deletions
  1. 29 0
      application/common/model/videoPlatform.php

+ 29 - 0
application/common/model/videoPlatform.php

@@ -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);
+    }
+}