<?php namespace common\models; use Yii; /** * This is the model class for table "middle_parint_price". * * @property integer $metal_id * @property integer $min_price * @property integer $price */ class MiddleParintPrice extends \common\models\Base { /** * @inheritdoc */ public static function tableName() { return 'middle_parint_price'; } /** * @inheritdoc */ public function rules() { return [ [['metal_id'], 'required'], [['metal_id', 'min_price', 'price'], 'integer'], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'metal_id' => 'Metal ID', 'min_price' => 'Min Price', 'price' => 'Price', ]; } /** * @ 钣金 */ public function getMetalPlatePart(){ return $this->hasOne(MetalPlatePart::className(),['id'=>'metal_id']); } }