Config.php 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\modules\admin\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%config}}".
  6. *
  7. * @property string $name
  8. * @property string|null $value
  9. * @property string $bak
  10. */
  11. class Config extends \app\common\models\EActiveRecord
  12. {
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public static function tableName()
  17. {
  18. return '{{%config}}';
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function rules()
  24. {
  25. return [
  26. [['name'], 'required'],
  27. [['value'], 'string'],
  28. [['name', 'bak'], 'string', 'max' => 50],
  29. [['name'], 'unique'],
  30. ];
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function attributeLabels()
  36. {
  37. return [
  38. 'name' => 'Name',
  39. 'value' => 'Value',
  40. 'bak' => 'Bak',
  41. ];
  42. }
  43. }