75 lines
2.0 KiB
PHP
75 lines
2.0 KiB
PHP
<?php
|
||
|
||
namespace common\modelsgii;
|
||
|
||
use Yii;
|
||
|
||
/**
|
||
* This is the model class for table "{{%attachment}}".
|
||
*
|
||
* @property int $id
|
||
* @property int $storage_id
|
||
* @property int $attachment_group_id
|
||
* @property int $user_id
|
||
* @property int $mall_id
|
||
* @property int $mch_id 多商户id
|
||
* @property string $name
|
||
* @property int $size 大小:字节
|
||
* @property string $url
|
||
* @property string $thumb_url
|
||
* @property int $type 类型:1=图片,2=视频
|
||
* @property int $created_at
|
||
* @property int $updated_at
|
||
* @property int $deleted_at
|
||
* @property int $is_delete
|
||
* @property int $is_recycle 是否加入回收站 0.否|1.是
|
||
*/
|
||
class Attachment extends \common\core\BaseActiveRecord
|
||
{
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public static function tableName()
|
||
{
|
||
return '{{%attachment}}';
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function rules()
|
||
{
|
||
return [
|
||
[['storage_id', 'user_id', 'name', 'size', 'url', 'type'], 'required'],
|
||
[['storage_id', 'attachment_group_id', 'user_id', 'mall_id', 'mch_id', 'size', 'type', 'created_at', 'updated_at', 'deleted_at', 'is_delete', 'is_recycle'], 'integer'],
|
||
[['name'], 'string', 'max' => 128],
|
||
[['url', 'thumb_url'], 'string', 'max' => 2080],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function attributeLabels()
|
||
{
|
||
return [
|
||
'id' => 'ID',
|
||
'storage_id' => 'Storage ID',
|
||
'attachment_group_id' => 'Attachment Group ID',
|
||
'user_id' => 'User ID',
|
||
'mall_id' => 'Mall ID',
|
||
'mch_id' => '多商户id',
|
||
'name' => 'Name',
|
||
'size' => '大小:字节',
|
||
'url' => 'Url',
|
||
'thumb_url' => 'Thumb Url',
|
||
'type' => '类型:1=图片,2=视频',
|
||
'created_at' => 'Created At',
|
||
'updated_at' => 'Updated At',
|
||
'deleted_at' => 'Deleted At',
|
||
'is_delete' => 'Is Delete',
|
||
'is_recycle' => '是否加入回收站 0.否|1.是',
|
||
];
|
||
}
|
||
}
|