Favorite.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. /**
  10. * This is the model class for table "{{%favorite}}".
  11. *
  12. * @property integer $id
  13. * @property integer $store_id
  14. * @property integer $user_id
  15. * @property integer $goods_id
  16. * @property integer $created_at
  17. * @property integer $is_delete
  18. * @property integer $type
  19. * @property integer $worker_id;
  20. */
  21. class Favorite extends \yii\db\ActiveRecord
  22. {
  23. const FAVORITE_GOODS = 0;
  24. const FAVORITE_SHOP = 1;
  25. const FAVORITE_WORKER = 6;
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%favorite}}';
  32. }
  33. /**
  34. * @inheritdoc
  35. */
  36. public function rules()
  37. {
  38. return [
  39. [['store_id', 'user_id', 'goods_id', 'created_at'], 'required'],
  40. [['store_id', 'user_id', 'saas_id','goods_id','worker_id', 'created_at', 'is_delete', 'type', 'worker_id'], 'integer'],
  41. ];
  42. }
  43. /**
  44. * @inheritdoc
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'store_id' => 'Store ID',
  51. 'user_id' => 'User ID',
  52. 'saas_id' => 'Saas ID',
  53. 'goods_id' => 'Goods ID',
  54. 'created_at' => 'Addtime',
  55. 'is_delete' => 'Is Delete',
  56. 'worker_id' => '服务人员ID'
  57. ];
  58. }
  59. }