TimestampBehavior::class, 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()'), ], ]; } /** * {@inheritdoc} */ public function rules() { return [ [['name'], 'required'], [['description'], 'string'], [['created_at', 'updated_at'], 'safe'], [['name'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Название', 'description' => 'Описание', 'created_at' => 'Создано', 'updated_at' => 'Обновлено', ]; } }