200], [['marketing_type'], 'string', 'max' => 50], [['product_name', 'sku_name'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'merchant_id' => '商户id', 'member_id' => '用户编码', 'marketing_id' => '营销ID', 'marketing_type' => '营销类型', 'price' => '价格', 'number' => '商品数量', 'product_id' => '商品编码', 'product_picture' => '商品快照', 'product_name' => '商品名称', 'sku_id' => '商品sku编码', 'sku_name' => '商品sku信息', 'status' => '状态[-1:删除;0:禁用;1启用]', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * 关联sku * * @return \yii\db\ActiveQuery */ public function getSku() { return $this->hasOne(Sku::class, ['id' => 'sku_id']); } }