123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace app\models\entity;
- use Yii;
- /**
- * This is the model class for table "asusg_employee".
- *
- * @property int $id
- * @property string $asu_id
- * @property string $name
- * @property int $smopp_id
- */
- class AsusgJob2Command extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'asusg_job2command';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['smopp_cmd_id','asusg_job_id'], 'required'],
- [['smopp_cmd_id','asusg_job_id'], 'integer'],
- //[['asu_id'], 'string', 'max' => 45],
- //[['name'], 'string', 'max' => 255],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'asusg_job_id' => 'Asu ID',
- 'cmd_order' => 'Порядковый номер',
- 'smopp_cmd_id' => 'Smopp ID',
- ];
- }
-
- public function getTasktypes()
- {
- return $this->hasOne(Tasktypes::className(), ['id' => 'smopp_cmd_id']);
- }
-
- public function getJobplan()
- {
- return $this->hasOne(AsusgJobplan::className(), ['id' => 'asusg_job_id']);
- }
-
- public function getAsusgJob2Launch()
- {
- return $this->hasOne(AsusgJob2Launch::className(), ['id' => 'smopp_cmd_id']);
- }
-
- public function getJobplantie()
- {
- return $this->hasOne(AsusgJob2Launch::className(), ['asusg_jobplan_id' => 'asusg_job_id']);
- }
- }
|