VideoGoodsVote.php 1.4 KB

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