1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "IncidenteEmpleado".
- *
- * @property string $id
- * @property string|null $idIncidente
- * @property string|null $idEmpleado
- * @property string|null $creado
- * @property string|null $modificado
- * @property string|null $eliminado
- *
- * @property Empleado $idEmpleado0
- * @property Incidente $idIncidente
- */
- class IncidenteEmpleado extends ModeloBase
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'IncidenteEmpleado';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['id'], 'required'],
- [['creado', 'modificado', 'eliminado'], 'safe'],
- [['id', 'idIncidente', 'idEmpleado'], 'string', 'max' => 36],
- [['id'], 'unique'],
- [['idEmpleado'], 'exist', 'skipOnError' => true, 'targetClass' => Empleado::class, 'targetAttribute' => ['idEmpleado' => 'id']],
- [['idIncidente'], 'exist', 'skipOnError' => true, 'targetClass' => Incidente::class, 'targetAttribute' => ['idIncidente' => 'id']],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'idObra' => 'Id Obra',
- 'idIncidente' => 'Id Incidente',
- 'creado' => 'Creado',
- 'modificado' => 'Modificado',
- 'eliminado' => 'Eliminado',
- ];
- }
- /**
- * Gets query for [[IdEmpleado0]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getEmpleado()
- {
- return $this->hasOne(Empleado::class, ['id' => 'idEmpleado']);
- }
- /**
- * Gets query for [[IdObra0]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getIncidente()
- {
- return $this->hasOne(Incidente::class, ['id' => 'idIncidente']);
- }
- }
|