HangingOrderDetail.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. /**
  9. * This is the model class for table "{{%hanging_order_detail}}".
  10. *
  11. * @property integer $id
  12. * @property integer $order_id
  13. * @property integer $goods_id
  14. * @property integer $num
  15. * @property double $total_price
  16. * @property double $new_price
  17. * @property integer $is_delete
  18. * @property string $attr
  19. */
  20. class HangingOrderDetail extends \yii\db\ActiveRecord
  21. {
  22. /**
  23. * @inheritdoc
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%hanging_order_detail}}';
  28. }
  29. public function rules()
  30. {
  31. return [
  32. [['order_id','goods_id','num','total_price','is_delete','attr'],'required'],
  33. [['order_id','goods_id','num','is_delete'],'integer'],
  34. [['attr'],'string'],
  35. [['total_price', 'new_price'],'number']
  36. ];
  37. }
  38. public function attributeLabels(){
  39. return [
  40. 'order_id' => '挂单订单号',
  41. 'goods_id' => '商品ID',
  42. 'num' => '商品数量',
  43. 'total_price' => '商品总金额',
  44. 'is_delete' => '删除状态',
  45. 'attr' => '商品规格信息',
  46. 'new_price' => '新价格'
  47. ];
  48. }
  49. }