Beacons.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace app\models\entity;
  3. use Yii;
  4. /**
  5. * This is the model class for table "beacons".
  6. *
  7. * @property int $id
  8. * @property int $location_id
  9. * @property double $x
  10. * @property double $y
  11. * @property double $z
  12. * @property string $uuid
  13. */
  14. class Beacons extends \yii\db\ActiveRecord
  15. {
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public static function tableName()
  20. {
  21. return 'beacons';
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function rules()
  27. {
  28. return [
  29. [['x', 'y','location_id','uuid'], 'required'],
  30. [['location_id'], 'integer'],
  31. [['x', 'y', 'z'], 'number'],
  32. [['uuid'], 'string', 'max' => 36],
  33. ];
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => 'ID',
  42. 'location_id' => 'Ид локации',
  43. 'x' => 'точка X',
  44. 'y' => 'Точка Y',
  45. 'z' => 'Точка Z',
  46. 'uuid' => 'Uuid',
  47. ];
  48. }
  49. }