LiveCat.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%live_cat}}".
  13. *
  14. * @property $id int(11) NOT NULL AUTO_INCREMENT,
  15. * @property $store_id int(11) DEFAULT NULL,
  16. * @property $name varchar(255) NOT NULL COMMENT '直播类型名称',
  17. * @property $pic_url varchar(255) DEFAULT NULL COMMENT '分类图片',
  18. * @property $is_show tinyint(1) NOT NULL DEFAULT 1 ,
  19. * @property $is_delete tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除' ,
  20. * @property $sort int(11) NOT NULL DEFAULT 0 ,
  21. * @property $created_at int(11) NULL DEFAULT 0 ,
  22. */
  23. class LiveCat extends \yii\db\ActiveRecord
  24. {
  25. /**
  26. * @inheritdoc
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%live_cat}}';
  31. }
  32. public function behaviors()
  33. {
  34. return [
  35. [
  36. // 自动更新创建和更新时间
  37. 'class' => TimestampBehavior::class,
  38. 'updatedAtAttribute' => false,
  39. ]
  40. ];
  41. }
  42. }