VideoGoodsReport.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_report}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $user_id 用户id
  17. * @property int $is_delete 是否删除
  18. * @property int $vl_id 视频id
  19. * @property string $pic_url 图片地址
  20. * @property string $desc 描述
  21. * @property int $type 类型
  22. * @property int $status 状态
  23. * @property int created_at 创建时间
  24. * @property int updated_at 更新时间
  25. */
  26. class VideoGoodsReport extends \yii\db\ActiveRecord
  27. {
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public static function tableName()
  32. {
  33. return '{{%video_goods_report}}';
  34. }
  35. /**
  36. * 举报类型 0 默认投诉 1 涉及色情暴力 2 涉及欺诈造价 3 违禁信息 4 感觉被冒犯或歧视 5 涉及侵权 6 其他
  37. */
  38. const REPORT_DEFAULT = 0;
  39. const REPORT_VIOLENCE = 1;
  40. const REPORT_FAKE = 2;
  41. const REPORT_VIOLATE = 3;
  42. const REPORT_RACISM = 4;
  43. const REPORT_INFRINGE = 5;
  44. const REPORT_OTHER = 6;
  45. /**
  46. * @var array
  47. */
  48. public static $validReportType = [
  49. self::REPORT_DEFAULT => '默认投诉',
  50. self::REPORT_VIOLENCE => '涉及色情暴力',
  51. self::REPORT_FAKE => '涉及欺诈造价',
  52. self::REPORT_VIOLATE => '违禁信息',
  53. self::REPORT_RACISM => '感觉被冒犯或歧视',
  54. self::REPORT_INFRINGE => '涉及侵权',
  55. self::REPORT_OTHER => '其他'
  56. ];
  57. /**
  58. * @return array[]
  59. */
  60. public function behaviors()
  61. {
  62. return [
  63. [
  64. 'class' => TimestampBehavior::class,
  65. 'attributes' => [
  66. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  67. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  68. ]
  69. ]
  70. ];
  71. }
  72. /**
  73. * {@inheritdoc}
  74. */
  75. public function rules()
  76. {
  77. return [
  78. [['store_id', 'user_id', 'vl_id', 'type', 'status', 'updated_at', 'created_at', 'is_delete'], 'integer'],
  79. [['pic_url', 'desc'], 'string'],
  80. ];
  81. }
  82. }