VideoGoodsComment.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_comment}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $vl_id 视频id
  17. * @property int reply_id 回复用户id
  18. * @property string reply_name 回复用户名称
  19. * @property int $user_id 用户id
  20. * @property int $is_delete 是否删除
  21. * @property string $comment 评论内容
  22. * @property int $status 审核状态
  23. * @property int $parent_id 父级id
  24. * @property int $top_parent_id 顶级id
  25. * @property int created_at 创建时间
  26. * @property int updated_at 更新时间
  27. */
  28. class VideoGoodsComment extends \yii\db\ActiveRecord
  29. {
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public static function tableName()
  34. {
  35. return '{{%video_goods_comment}}';
  36. }
  37. public function behaviors()
  38. {
  39. return [
  40. [
  41. 'class' => TimestampBehavior::class,
  42. 'attributes' => [
  43. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  44. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  45. ]
  46. ]
  47. ];
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function rules()
  53. {
  54. return [
  55. [['store_id', 'vl_id', 'is_delete', 'reply_id', 'user_id', 'updated_at', 'created_at', 'status', 'parent_id', 'top_parent_id'], 'integer'],
  56. [['reply_name', 'comment'], 'string'],
  57. ];
  58. }
  59. }