init
This commit is contained in:
48
models/AuthAssignment.php
Normal file
48
models/AuthAssignment.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace app\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "auth_assignment".
|
||||
*
|
||||
* @property string $item_name
|
||||
* @property string $user_id
|
||||
* @property int $created_at
|
||||
*/
|
||||
class AuthAssignment extends \yii\db\ActiveRecord
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'auth_assignment';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['item_name', 'user_id'], 'required'],
|
||||
[['created_at'], 'integer'],
|
||||
[['item_name', 'user_id'], 'string', 'max' => 64],
|
||||
[['item_name', 'user_id'], 'unique', 'targetAttribute' => ['item_name', 'user_id']],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'item_name' => 'Item Name',
|
||||
'user_id' => 'User ID',
|
||||
'created_at' => 'Created At',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user