| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%live_room_purview}}".
- *
- * @property int $id
- * @property int $store_id
- * @property int $room_id 直播间ID
- * @property string $user_id 用户ID
- * @property string $level_id 会员等级ID
- * @property string $type 可见范围:0=所有人;1=指定用户;2=指定会员;
- * @property int $created_at 添加时间
- * @property int $updated_at 更新时间
- * @property int $is_delete 是否删除:0=否;1=是;
- */
- class LiveRoomPurview extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%live_room_purview}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['store_id'], 'required'],
- [['store_id','updated_at', 'created_at', 'is_delete', 'type', 'room_id'], 'integer'],
- [['user_id', 'level_id'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'room_id' => '直播间ID',
- 'user_id' => '用户ID',
- 'level_id' => '会员等级ID',
- 'type' => '可见范围:0=所有人;1=指定用户;2=指定会员',
- 'is_delete' => '是否删除:0=否;1=是;',
- 'created_at' => '添加时间',
- 'updated_at' => 'Update Time',
- ];
- }
- }
|