<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "vjj".
*
*
@property integer $jjid
* @property string $jj
* @property integer $iszhutab1
* @property string $Iva
* @property string $appkey
* @property integer $live
* @property string $video
* @property string $title
* @property string $cover
* @property integer $videoStartPrefixSeconds
* @property integer $videoEndPrefixSeconds
* @property integer $skinSelect
* @property integer $autoplay
* @property integer $rightHand
* @property integer $autoFormat
* @property integer $bubble
* @property integer $jumpStep
* @property integer $tagTrack
* @property integer $tagShow
* @property integer $tagDuration
* @property integer $tagFontSize
* @property string $uper
* @property string $uptime
* @property string $otherinfo
*/
class Vjj extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'vjj';
}
public function scenarios()
{
return [
'create' => ['jj', 'iszhutab1', 'Iva', 'appkey', 'live', 'video', 'title', 'cover', 'videoStartPrefixSeconds', 'videoEndPrefixSeconds', 'skinSelect', 'autoplay', 'rightHand', 'autoFormat', 'bubble', 'jumpStep', 'tagTrack', 'tagShow', 'tagDuration', 'tagFontSize', 'uper', 'uptime', 'otherinfo'],
'update' => ['jj', 'iszhutab1', 'Iva', 'appkey', 'live', 'video', 'title', 'cover', 'videoStartPrefixSeconds', 'videoEndPrefixSeconds', 'skinSelect', 'autoplay', 'rightHand', 'autoFormat', 'bubble', 'jumpStep', 'tagTrack', 'tagShow', 'tagDuration', 'tagFontSize', 'uper', 'uptime', 'otherinfo'],
];
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['iszhutab1', 'live', 'videoStartPrefixSeconds', 'videoEndPrefixSeconds', 'skinSelect', 'autoplay', 'rightHand', 'autoFormat', 'bubble', 'jumpStep', 'tagTrack', 'tagShow', 'tagDuration', 'tagFontSize'], 'integer', 'min' => 0],
[['iszhutab1', 'live', 'autoplay', 'rightHand', 'autoFormat', 'bubble', 'tagTrack', 'tagShow'], 'integer', 'max' => 1],
['skinSelect', 'in', 'range' => [0, 1, 2]],
['tagFontSize', 'integer', 'min' => 8, 'max' => 72],
[['jj', 'video', 'title', 'uper'], 'required'],
[['uptime'], 'safe'],
['jj', 'string', 'min' => 32, 'tooShort' => '请输入32位字符串(需全局唯一,支持中文,所以大胆个性化选择)'],
['jj', 'unique', 'message' => '后端验证错误:唯一识别码已在视频库中存在,请重新选择!', 'on' => ['create', 'update']],
[['jj', 'appkey', 'uper'], 'string', 'max' => 32],
['title', 'string', 'min' => 6],
[['Iva', 'video', 'title', 'cover', 'otherinfo'], 'string', 'max' => 255],
[['video', 'cover'], 'url', 'defaultScheme' => 'http'],
['Iva', 'default', 'value' => 'Iva'],
['live', 'default', 'value' => 0],
['cover', 'default', 'value' => '
https://danjuan.oss-cn-shanghai.aliyuncs.com/webupload/T1Q5DmBCYT1RXrhCrK.jpg'],
['videoStartPrefixSeconds', 'default', 'value' => 0],
['videoEndPrefixSeconds', 'default', 'value' => 0],
['skinSelect', 'default', 'value' => 0],
['autoplay', 'default', 'value' => 0],
['rightHand', 'default', 'value' => 0],
['autoFormat', 'default', 'value' => 0],
['bubble', 'default', 'value' => 1],
['jumpStep', 'default', 'value' => 10],
['tagTrack', 'default', 'value' => 0],
['tagShow', 'default', 'value' => 0],
['tagDuration', 'default', 'value' => 5],
['tagFontSize', 'default', 'value' => 16],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'jjid' => '自增序号',
'jj' => '视频唯一标识码(32位自定义)',
'iszhutab1' => '默认即可',
'Iva' => '默认即可',
'appkey' => '默认即可',
'live' => '是否是直播流,默认为false',
'video' => '播放地址【必填】',
'title' => '视频标题【必填】',
'cover' => '选填,视频封面URL(
http://.jpg|.png)',
'videoStartPrefixSeconds' => '选填,跳过片头,默认为0',
'videoEndPrefixSeconds' => '选填,跳过片尾,默认为0',
'skinSelect' => '选填,播放器皮肤,可选0、1、2,默认为0',
'autoplay' => '选填,是否自动播放,默认为false',
'rightHand' => '选填,是否开启右键菜单,默认为false',
'autoFormat' => '选填,是否自动选择最高清晰度,默认为false',
'bubble' => '选填,是否开启云泡功能,默认为true',
'jumpStep' => '选填,左右方向键快退快进的时间',
'tagTrack' => '选填,云链是否跟踪,默认为false',
'tagShow' => '选填,云链是否显示,默认为false',
'tagDuration' => '选填,云链显示时间,默认为5秒',
'tagFontSize' => '选填,云链文字大小,默认为16像素',
'uper' => '上传者【必填】',
'uptime' => '系统自动生成',
'otherinfo' => '其他|备注|备用字段',
];
}
}
Vjj.php