xhDistrict.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "xhDistrict".
  5. *
  6. * @property integer $id
  7. * @property integer $parentId
  8. * @property string $districtId
  9. * @property string $shortName
  10. * @property string $fullName
  11. * @property string $locationLat
  12. * @property string $locationLng
  13. */
  14. class xhDistrict extends xhBaseModel
  15. {
  16. /**
  17. * @inheritdoc
  18. */
  19. public static function tableName()
  20. {
  21. return 'xhDistrict';
  22. }
  23. /**
  24. * @inheritdoc
  25. */
  26. public function rules()
  27. {
  28. return [
  29. [['parentId'], 'integer'],
  30. [['districtId', 'shortName', 'locationLat', 'locationLng'], 'string', 'max' => 20],
  31. [['fullName'], 'string', 'max' => 50],
  32. ];
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'parentId' => 'Parent ID',
  42. 'districtId' => 'District ID',
  43. 'shortName' => 'Short Name',
  44. 'fullName' => 'Full Name',
  45. 'locationLat' => 'Location Lat',
  46. 'locationLng' => 'Location Lng',
  47. ];
  48. }
  49. }