| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%video}}".
- *
- * @property int $id
- * @property string|null $title 标题
- * @property string|null $url
- * @property string|null $sort 排序 升序
- * @property int|null $is_delete
- * @property int|null $created_at
- * @property int|null $store_id 商城id
- * @property string|null $pic_url
- * @property string|null $content 详情介绍
- * @property int|null $type 视频来源 0--源地址 1--腾讯视频
- * @property int|null $updated_at 更新时间
- */
- class Video extends ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%video}}';
- }
- const IS_DELETE_YES = 1;//已删除
- const IS_DELETE_NO = 0;//未删除
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['is_delete', 'store_id', 'type', 'sort'], 'integer'],
- [['content'], 'string'],
- [['title'], 'string', 'max' => 255],
- [['url', 'pic_url'], 'string', 'max' => 2048],
- ['is_delete', 'default', 'value' => 0]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'title' => '标题',
- 'url' => 'Url',
- 'sort' => '排序 升序',
- 'is_delete' => 'Is Delete',
- 'store_id' => '商城id',
- 'pic_url' => 'Pic Url',
- 'content' => '详情介绍',
- 'type' => '视频来源 0--源地址 1--腾讯视频',
- ];
- }
- }
|