VideoGoodsList.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. use Yii;
  11. /**
  12. * This is the model class for table "{{%video_goods_list}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $user_id 用户id
  17. * @property string $title 标题
  18. * @property int $cat_id 分类id
  19. * @property string $cover_pic 封面图
  20. * @property string $pic_list 图片
  21. * @property string $video_url 视频地址
  22. * @property string $content 内容
  23. * @property int $type 类型
  24. * @property string $goods_id 商品
  25. * @property int $is_show 是否展示
  26. * @property int $is_delete 是否删除
  27. * @property int $status 状态
  28. * @property int $is_top 是否是置顶
  29. * @property int $user_delete 用户删除
  30. * @property string $refuse_desc 拒绝原因
  31. * @property string $longitude
  32. * @property string $latitude
  33. * @property string $address
  34. * @property int $sort 排序
  35. * @property string $douyin_url
  36. * @property int created_at 创建时间
  37. * @property int updated_at 更新时间
  38. * @property int views
  39. */
  40. class VideoGoodsList extends \yii\db\ActiveRecord
  41. {
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public static function tableName()
  46. {
  47. return '{{%video_goods_list}}';
  48. }
  49. public function behaviors()
  50. {
  51. return [
  52. [
  53. 'class' => TimestampBehavior::class,
  54. 'attributes' => [
  55. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  56. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  57. ]
  58. ]
  59. ];
  60. }
  61. /**
  62. * {@inheritdoc}
  63. */
  64. public function rules()
  65. {
  66. return [
  67. [['store_id', 'is_top', 'user_id', 'is_delete', 'status', 'created_at', 'updated_at', 'cat_id', 'is_show', 'type', 'user_delete', 'sort','views'], 'integer'],
  68. [['title', 'cover_pic', 'pic_list', 'video_url', 'content', 'refuse_desc', 'goods_id', 'longitude', 'latitude', 'address', 'douyin_url'], 'string']
  69. ];
  70. }
  71. }