PhotoFilter.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "photo_filter".
  6. *
  7. * @property int $id
  8. * @property int $brightness
  9. * @property int $saturate
  10. * @property int $contrast
  11. * @property int $opacity
  12. */
  13. class PhotoFilter extends \yii\db\ActiveRecord
  14. {
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public static function tableName()
  19. {
  20. return 'photo_filter';
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function rules()
  26. {
  27. return [
  28. [['id', 'brightness', 'saturate', 'contrast', 'opacity'], 'required'],
  29. [['id', 'brightness', 'saturate', 'contrast'], 'integer'],
  30. [[ 'opacity'], 'number'],
  31. [['id'], 'unique'],
  32. ];
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'brightness' => 'Brightness',
  42. 'saturate' => 'Saturate',
  43. 'contrast' => 'Contrast',
  44. 'opacity' => 'Opacity',
  45. ];
  46. }
  47. }