1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "ConceptosObra".
- *
- * @property string $id
- * @property string $idObra
- * @property string $idConceptoObra
- * @property string|null $cantidad
- * @property string|null $descripcion
- * @property string $estatus
- *
- */
- class Gasto extends ModeloBase
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'Gasto';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['id','idObra','idConceptoObra'], 'required'],
- [['creado', 'modificado', 'eliminado','fechaCompra'], 'safe'],
- [['cantidad'], 'number'],
- [['cantidad'], 'default', 'value' => null],
- [['id', 'idObra','idConceptoObra'], 'string', 'max' => 36],
- [[ 'descripcion'], 'string', 'max' => 100],
- [['idObra'], 'exist', 'skipOnError' => true, 'targetClass' => Obra::class, 'targetAttribute' => ['idObra' => 'id']],
- [['idConceptoObra'], 'exist', 'skipOnError' => true, 'targetClass' => ConceptosObra::class, 'targetAttribute' => ['idConceptoObra' => 'id']],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'idObra' => 'ID de la Obra',
- 'idConceptoObra' => 'ID del Concepto Obra',
- 'cantidad' => 'Cantidad',
- 'descripcion' => 'Descripcion',
- 'fechaCompra' => 'Fecha de Compra',
- 'creado' => 'Creado',
- 'modificado' => 'Modificado',
- 'eliminado' => 'Eliminado',
- ];
- }
- }
|