for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Itstructure\MFUploader\models;
/**
* This is the model class for table "s3_file_options".
*
* @property int $mediafileId Mediafile id.
* @property string $bucket Bucket.
* @property string $prefix Prefix path.
* @property Mediafile $mediafile
* @package Itstructure\MFUploader\models
* @author Andrey Girnik <[email protected]>
*/
class S3FileOptions extends \yii\db\ActiveRecord
{
* {@inheritdoc}
public static function tableName()
return 's3_file_options';
}
public function rules()
return [
[
'mediafileId',
'bucket',
'prefix',
],
'required',
'integer',
'string',
'max' => 64,
'max' => 128,
'unique',
'targetAttribute' => [
['mediafileId'],
'exist',
'skipOnError' => true,
'targetClass' => Mediafile::class,
'targetAttribute' => ['mediafileId' => 'id'],
];
public function attributeLabels()
'mediafileId' => 'Mediafile ID',
'bucket' => 'Bucket',
'prefix' => 'Prefix',
* @return \yii\db\ActiveQuery
public function getMediaFile()
return $this->hasOne(Mediafile::class, ['id' => 'mediafileId']);