FoodCart.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. /*
  8. * @Author: your name
  9. * @Date: 2021-03-02 09:50:20
  10. * @LastEditTime: 2021-05-15 11:49:19
  11. * @LastEditors: Please set LastEditors
  12. * @Description: In User Settings Edit
  13. * @FilePath: \admin_php\models\Cart.php
  14. */
  15. namespace app\models;
  16. use Yii;
  17. /**
  18. * This is the model class for table "{{%food_cart}}".
  19. *
  20. * @property int $id
  21. * @property int $flag_id
  22. * @property int $user_id 用户id
  23. * @property int $goods_id 商品id
  24. * @property int $num 商品数量
  25. * @property int $created_at
  26. * @property int $updated_at
  27. * @property int $is_delete
  28. * @property string $attr 规格
  29. */
  30. class FoodCart extends \yii\db\ActiveRecord
  31. {
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public static function tableName()
  36. {
  37. return '{{%food_cart}}';
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function rules()
  43. {
  44. return [
  45. [['user_id', 'goods_id', 'attr', 'flag_id'], 'required'],
  46. [['user_id', 'goods_id', 'num', 'created_at', 'is_delete', 'updated_at'], 'integer'],
  47. [['attr'], 'string'],
  48. [['food_ext_goods'], 'safe'],
  49. ];
  50. }
  51. }