Goods.php 621 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace api\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "goods".
  6. *
  7. * @property int $id
  8. * @property string $name
  9. */
  10. class Goods extends \yii\db\ActiveRecord
  11. {
  12. /**
  13. * @inheritdoc
  14. */
  15. public static function tableName()
  16. {
  17. return 'goods';
  18. }
  19. /**
  20. * @inheritdoc
  21. */
  22. public function rules()
  23. {
  24. return [
  25. [['name'], 'string', 'max' => 100],
  26. ];
  27. }
  28. /**
  29. * @inheritdoc
  30. */
  31. public function attributeLabels()
  32. {
  33. return [
  34. 'id' => 'ID',
  35. 'name' => 'Name',
  36. ];
  37. }
  38. }