255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'name' => '卡密名称', 'content' => '使用说明', 'is_delete' => 'Is Delete', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'deleted_at' => 'Deleted At', 'list' => '卡密字段', 'sales' => '已售', 'stock' => '库存', 'is_unique' => '是否去重 0--否 1--是', 'pre_stock' => '占用的库存', 'total_stock' => '总库存', ]; } public function getEcardOptions() { return $this->hasMany(EcardOptions::className(), ['ecard_id' => 'id']); } public function getGoodsWarehouse() { return $this->hasMany(GoodsWarehouse::className(), ['ecard_id' => 'id'])->andWhere(['is_delete' => 0]); } }