123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "Herramienta Inventario"
- *
- * @property string $id
- * @property string $idHerramienta
- * @property string $estatus
- * @property number|null $cantidad
- * @property string|null $fechaIngreso
- * @property string|null $descripcion
- * @property Herramienta $idHerramienta
- *
- */
- class HerramientaInventario extends ModeloBase
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'HerramientaInventario';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['id'], 'required'],
- [['fechaIngreso','creado', 'modificado', 'eliminado'], 'safe'],
- [['id', 'idHerramienta','estatus'], 'string', 'max' => 36],
- [['descripcion'],'string','max'=>100],
- [['cantidad'], 'number'],
- [['id'], 'unique'],
- [['idHerramienta'], 'exist', 'skipOnError' => true, 'targetClass' => Herramienta::class, 'targetAttribute' => ['idHerramienta' => 'id']],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'idHerramienta' => 'Id Herramienta',
- 'cantidad' => 'Cantidad',
- 'estatus' => 'Estatus',
- 'fechaIngreso' => 'Fecha Ingreso',
- 'descripcion'=>'Descripcion',
- 'creado' => 'Creado',
- 'modificado' => 'Modificado',
- 'eliminado' => 'Eliminado',
- ];
- }
- /**
- * Gets query for [[IdHerramienta]].
- *
- * @return \yii\db\ActiveQuery
- */
- public function getHerramienta()
- {
- return $this->hasOne(Herramienta::class, ['id' => 'idHerramienta']);
- }
- }
|