add property and property definition
This commit is contained in:
58
common/models/PropertyDefinition.php
Normal file
58
common/models/PropertyDefinition.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "property_definition".
|
||||
*
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $label
|
||||
* @property string $type
|
||||
* @property string $config
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class PropertyDefinition extends \yii\db\ActiveRecord
|
||||
{
|
||||
const DEFINITION_GROUP_TRAINING_CUSTOMER_CANCEL_TIME_LIMIT = "GROUP_TRAINING_CUSTOMER_CANCEL_TIME_LIMIT";
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'property_definition';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['name', 'label', 'type'], 'required'],
|
||||
[['created_at', 'updated_at'], 'safe'],
|
||||
[['name', 'label', 'type'], 'string', 'max' => 100],
|
||||
[['config'], 'string', 'max' => 255]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => 'ID',
|
||||
'name' => 'Name',
|
||||
'label' => 'Label',
|
||||
'type' => 'Type',
|
||||
'config' => 'Config',
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user