Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Yii;
- namespace backend\models;
- use backend\models\TypeZakaz;
- /**
- * This is the model class for table "order".
- *
- * @property int $id
- * @property int $tasks_id
- * @property int $type_zakaz_id
- */
- class Order extends \yii\db\ActiveRecord
- {
- public function getDeals(){
- return $this->hasOne(Deals::className(), ['id' => 'deals_id']);
- }
- public function getType(){
- return $this->hasOne(TypeZakaz::className(), ['id' => 'type_zakaz_id']);
- }
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'order';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['deals_id', 'type_zakaz_id'], 'integer'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'deals_id' => 'deals ID',
- 'type_zakaz_id' => 'Type Zakaz ID',
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment