LiveRoom.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_room}}".
  13. *
  14. * @property $id int(11) NOT NULL AUTO_INCREMENT,
  15. * @property $store_id int(11) DEFAULT NULL,
  16. * @property $name varchar(255) DEFAULT NULL COMMENT '',
  17. * @property $anchor_id int(11) NOT NULL COMMENT '主播ID',
  18. * @property $start_time int(11) DEFAULT NULL COMMENT '开始时间',
  19. * @property $end_time int(11) DEFAULT NULL COMMENT '结束时间',
  20. * @property $is_close int(1) DEFAULT '0' COMMENT '是否结束',
  21. * @property $look_num int(11) DEFAULT '0' COMMENT '观看人数',
  22. * @property $good_num int(11) DEFAULT '0' COMMENT '点赞人数',
  23. * @property $open_comment tinyint(1) NOT NULL DEFAULT 1 COMMENT '打开评论' ,
  24. * @property $open_good tinyint(1) NOT NULL DEFAULT 1 COMMENT '打开点赞' ,
  25. * @property $open_share tinyint(1) NOT NULL DEFAULT 1 COMMENT '打开分享' ,
  26. * @property $pic_url varchar(255) DEFAULT NULL COMMENT '直播封面',
  27. * @property $push_url varchar(255) DEFAULT NULL COMMENT '推流地址',
  28. * @property $weigui varchar(255) DEFAULT '' COMMENT '违规操作',
  29. * @property $goods_id varchar(255) DEFAULT NULL COMMENT '直播绑定商品',
  30. * @property $desc varchar(255) DEFAULT NULL COMMENT '直播间简介',
  31. * @property $address varchar(255) DEFAULT NULL COMMENT '位置',
  32. * @property $pre_play_time int(11) DEFAULT NULL COMMENT '预播开始时间,如果为null,则不是预播,如果为预播,开始直播时,该字段设为null',
  33. * @property $is_delete tinyint(1) DEFAULT '0' COMMENT '是否删除',
  34. * @property $off_time int(11) DEFAULT NULL COMMENT '主播没在直播状态开始时间',
  35. * @property $record text COMMENT '存放回放地址列表,json',
  36. * @property $created_at int(11) NULL DEFAULT 0 ,
  37. * @property $updated_at int(11) NULL DEFAULT 0 ,
  38. */
  39. class LiveRoom extends \yii\db\ActiveRecord
  40. {
  41. /**
  42. * @inheritdoc
  43. */
  44. public static function tableName()
  45. {
  46. return '{{%live_room}}';
  47. }
  48. public function behaviors()
  49. {
  50. return [
  51. [
  52. // 自动更新创建和更新时间
  53. 'class' => TimestampBehavior::class,
  54. ]
  55. ];
  56. }
  57. }