VideoGoodsFocus.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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_focus}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $focus_user_id 关注者用户id
  17. * @property int $user_id 用户id
  18. * @property int $is_delete 是否删除
  19. * @property int $is_cancel 是否取消
  20. * @property int created_at 创建时间
  21. * @property int updated_at 更新时间
  22. */
  23. class VideoGoodsFocus extends \yii\db\ActiveRecord
  24. {
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%video_goods_focus}}';
  31. }
  32. public function behaviors()
  33. {
  34. return [
  35. [
  36. 'class' => TimestampBehavior::class,
  37. 'attributes' => [
  38. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  39. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  40. ]
  41. ]
  42. ];
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function rules()
  48. {
  49. return [
  50. [['store_id', 'focus_user_id', 'is_delete', 'is_cancel', 'user_id', 'created_at', 'updated_at'], 'integer'],
  51. ];
  52. }
  53. }