| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%purchase_order_detail}}".
- *
- * @property integer $id
- * @property integer $order_id
- * @property integer $goods_id
- * @property integer $num
- * @property string $total_price
- * @property integer $created_at
- * @property integer $is_delete
- * @property string $attr
- * @property string $pic
- * @property string $goods_name
- * @property string $goods_info
- * @property integer $send_type
- * @property integer $is_give
- * @property float $before_update_price
- */
- class PurchaseOrderDetail extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%purchase_order_detail}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['order_id', 'goods_id', 'attr'], 'required'],
- [['order_id', 'goods_id', 'num', 'created_at', 'is_delete', 'send_type', 'is_give'], 'integer'],
- [['total_price', 'before_update_price'], 'number'],
- [['attr'], 'string'],
- [['pic', 'goods_name'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'order_id' => 'Order ID',
- 'goods_id' => 'Goods ID',
- 'num' => '商品数量',
- 'total_price' => '此商品的总价',
- 'created_at' => 'Addtime',
- 'is_delete' => 'Is Delete',
- 'attr' => '商品规格',
- 'pic' => '商品规格图片',
- 'is_level' => '会员折扣',
- 'goods_name' => '商品名称',
- 'send_type' => '配送类型'
- ];
- }
- public function getOrder() {
- return $this->hasOne(PurchaseOrder::className(), ['id' => 'order_id']);
- }
- }
|