| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- Doo::loadCore('db/DooModel');
- /**
- * Created by PhpStorm.
- * User: ellisran
- * Date: 2016/9/22
- * Time: 16:20
- */
- class Ktvideo extends DooModel {
- public $videoid;
- public $videoname;
- public $objectname;
- public $wy_video_id;
- public $classid;
- public $typeid;
- public $seid;
- public $type_video_id;
- public $file_time;
- public $file_ext;
- public $file_size;
- public $isshow;
- public $addtime;
- public $_table = 'kt_video';
- public $_primarykey = 'videoid';
- public $_fields = array('videoid', 'videoname', 'objectname', 'wy_video_id', 'classid', 'typeid', 'seid', 'type_video_id', 'file_time', 'file_ext', 'file_size', 'isshow', 'addtime');
- public function __construct() {
- parent::setupModel(__CLASS__);
- }
- public function getVideobySec($seid) {
- return $this->find(array('where' => 'seid='.$seid, 'asc' => 'videoid', 'asArray' => TRUE));
- }
- public function getVideobySecAndShow($seid) {
- return $this->find(array('where' => 'isshow=1 and seid='.$seid, 'asc' => 'videoid', 'asArray' => TRUE));
- }
- public function getvideobyid($id) {
- return $this->getOne(array('select' => 'wy_video_id,videoname,type_video_id,file_ext', 'where' => 'videoid='.$id, 'asArray' => TRUE));
- }
- public function getsecbyid($id) {
- return $this->getOne(array('select' => 'seid', 'where' => 'videoid='.$id, 'asArray' => TRUE));
- }
- }
|