add property and property definition
This commit is contained in:
53
common/models/Property.php
Normal file
53
common/models/Property.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "property".
|
||||
*
|
||||
* @property integer $id
|
||||
* @property integer $id_user
|
||||
* @property integer $id_property_definition
|
||||
* @property string $value
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Property extends \yii\db\ActiveRecord
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'property';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['id_user', 'id_property_definition'], 'integer'],
|
||||
[['created_at', 'updated_at'], 'safe'],
|
||||
[['value'], 'string', 'max' => 255]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => 'ID',
|
||||
'id_user' => 'Id User',
|
||||
'id_property_definition' => 'Id Property Definition',
|
||||
'value' => 'Value',
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user