12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\models\entity;
- use Yii;
- /**
- * This is the model class for table "asusg_jobplan".
- *
- * @property int $id
- * @property string $name
- * @property int $smopp_jt_id
- * @property int $asusg_id
- */
- class AsusgJob2Launch extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'asusg_job2launch';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['asusg_project_id','asusg_jobplan_id','job_order'], 'required'],
- [['asusg_job_uuid'], 'unique'],
- [['asusg_job_uuid', 'employees_uuid'], 'unique', 'targetAttribute' => ['asusg_job_uuid', 'employees_uuid']],
- ];
- }
- public function getAsusgJobplan()
- {
- return $this->hasOne(AsusgJobplan::className(), ['id' => 'asusg_jobplan_id']);
- }
- /*
- public function getAsusgJobplan()
- {
- return $this->hasOne(AsusgJobplan::className(), ['id' => 'asusg_jobplan_id']);
- }*/
- public function getAsusgProject()
- {
- return $this->hasOne(AsusgProject::className(), ['id' => 'asusg_project_id']);
- }
-
- public function getTasks()
- {
- return $this->hasOne(Tasks::className(), ['asusg_job_mapped_id' => 'id']);
- }
- }
|