Settings.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. use yii\db\ActiveRecord;
  5. /**
  6. * This is the model class for table "{{%settings}}".
  7. *
  8. * @property int $id
  9. * @property int $invoce
  10. * @property int $act
  11. * @property int $time
  12. * @property int $created_at
  13. * @property int $updated_at
  14. */
  15. class Settings extends ActiveRecord
  16. {
  17. public function behaviors()
  18. {
  19. return [
  20. 'timestamp' => [
  21. 'class' => 'yii\behaviors\TimestampBehavior',
  22. 'attributes' => [
  23. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
  24. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
  25. ],
  26. ],
  27. ];
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public static function tableName()
  33. {
  34. return '{{%settings}}';
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function rules()
  40. {
  41. return [
  42. [['invoce', 'act', 'time'], 'required'],
  43. [['invoce', 'act', 'time', 'created_at', 'updated_at'], 'integer'],
  44. ];
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function attributeLabels()
  50. {
  51. return [
  52. 'id' => 'ID',
  53. 'invoce' => 'Invoce',
  54. 'act' => 'Act',
  55. 'time' => 'Time',
  56. 'created_at' => 'Created At',
  57. 'updated_at' => 'Updated At',
  58. ];
  59. }
  60. }