12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\models;
- /**
- * This is the model class for table "os_log_eipp_response".
- *
- * @property int $id
- * @property string $indx [varchar(255)]
- * @property string $desc [varchar(255)]
- * @property string $response
- * @property int $date [timestamp]
- *
- * \ */
- class LogEippResponse extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'os_log_eipp_response';
- }
- public static function getDb()
- {
- return \Yii::$app->slave_db;
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- //[['date'], 'safe'],
- //[['section', 'error_text'], 'required'],
- //[['error_text'], 'string'],
- //[['section'], 'integer'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'date' => 'Date',
- 'section' => 'Section',
- 'error_text' => 'Error Text',
- ];
- }
- public static function addlog($section,$text,$desc = '')
- {
- $logsModel = new LogEippResponse();
- $logsModel->indx = $section;
- $logsModel->response = $text;
- $logsModel->desc = $desc;
- $logsModel->save();
- }
- }
|