| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%pt_activity_goods}}".
- *
- * @property integer $id
- * @property integer $goods_id
- * @property string $attr
- * @property integer $virtual_sales
- * @property float $pt_price
- * @property integer $store_id
- * @property integer $is_delete
- * @property integer $activity_id
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $use_attr
- * @property integer $sale_num
- * @property integer $cat_id
- */
- class PtActivityGoods extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%pt_activity_goods}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
- ]
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'goods_id', 'virtual_sales', 'store_id', 'is_delete', 'activity_id', 'cat_id', 'use_attr'], 'integer'],
- [['attr'], 'string'],
- [['sale_num', 'pt_price'], 'number'],
- [['created_at', 'updated_at'], 'safe']
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => '',
- 'goods_id' => '商品id',
- 'attr' => '商品规格',
- 'virtual_sales' => '虚拟销量',
- 'pt_price' => '拼团价格',
- 'store_id' => 'Store ID',
- 'is_delete' => 'IS Delete',
- 'activity_id' => '活动id',
- 'created_at' => '',
- 'updated_at' => '',
- 'use_attr' => '是否使用规格',
- 'sale_num' => '售卖数量',
- 'cat_id' => '分类ID'
- ];
- }
- }
|