CloudInventoryOrderDetail.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. class CloudInventoryOrderDetail extends \yii\db\ActiveRecord
  9. {
  10. public $goods;
  11. /**
  12. * @inheritdoc
  13. */
  14. public static function tableName()
  15. {
  16. return '{{%cloud_inventory_order_detail}}';
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function rules()
  22. {
  23. return [
  24. [['order_id', 'goods_id', 'num', 'total_price', 'attr', 'cat_id'], 'required'],
  25. [[ 'order_id', 'goods_id', 'num', 'is_delete','cat_id'], 'integer'],
  26. [['attr','pic','goods_name'], 'string'],
  27. ];
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. public function attributeLabels()
  33. {
  34. return [
  35. 'id' => 'ID',
  36. 'order_id' => '订单 ID',
  37. 'goods_id' => '商品id',
  38. 'goods_name' => '商品名称',
  39. 'num' => '商品数量',
  40. 'total_price' => '此商品的总价',
  41. 'attr' => '商品规格',
  42. 'pic' => '商品规格图片',
  43. 'cat_id' => '商品分类id',
  44. 'is_delete' => 'Is Delete',
  45. ];
  46. }
  47. }