UnidadMedida.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "UnidadMedida".
  6. *
  7. * @property string $id
  8. * @property string|null $nombre
  9. * @property string|null $descripcion
  10. *
  11. */
  12. class UnidadMedida extends ModeloBase
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName()
  18. {
  19. return 'UnidadMedida';
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function rules()
  25. {
  26. return [
  27. [['id'], 'required'],
  28. [['creado', 'modificado', 'eliminado'], 'safe'],
  29. [['id'], 'string', 'max' => 36],
  30. [['nombre', 'descripcion'], 'string', 'max' => 100],
  31. [['id'], 'unique'],
  32. ];
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'nombre' => 'Clave',
  42. 'descripcion' => 'Descripcion',
  43. 'creado' => 'Creado',
  44. 'modificado' => 'Modificado',
  45. 'eliminado' => 'Eliminado',
  46. ];
  47. }
  48. }