WpLogs.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace app\models\entity;
  3. use Yii;
  4. /**
  5. * This is the model class for table "so_wp_logs".
  6. *
  7. * @property int $id
  8. * @property int $id_session
  9. * @property string $old_val
  10. * @property int $new_val
  11. */
  12. class WpLogs extends \yii\db\ActiveRecord
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName()
  18. {
  19. return 'so_wp_logs';
  20. }
  21. public static function getDb()
  22. {
  23. return \Yii::$app->slave_db;
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['id_session', 'old_val', 'new_val'], 'required'],
  32. [['id_session'], 'integer'],
  33. [['old_val'], 'string'],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'id_session' => 'Id Session',
  44. 'old_val' => 'Old Val',
  45. 'new_val' => 'New Val',
  46. ];
  47. }
  48. }