0
0

Client.php 513 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. use yii\behaviors\TimestampBehavior;
  5. use yii\db\ActiveRecord;
  6. /**
  7. * Class Client
  8. * @package common\models
  9. */
  10. class Client extends ActiveRecord
  11. {
  12. const STATUS_DELETED = 0;
  13. const STATUS_ACTIVE = 1;
  14. /**
  15. * @inheritdoc
  16. */
  17. public function behaviors()
  18. {
  19. return [
  20. [
  21. 'class' => TimestampBehavior::className(),
  22. 'createdAtAttribute' => 'created_at',
  23. 'updatedAtAttribute' => 'updated_at',
  24. 'value' => function() { return time();},
  25. ],
  26. ];
  27. }
  28. }