xhUserAddress.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "xhUserAddress".
  6. *
  7. * @property string $id
  8. * @property int $userId 商家id/用户id
  9. * @property string $name 收货人姓名
  10. * @property string $phone 手机号
  11. * @property string $tag 标签
  12. * @property string $lat 纬度
  13. * @property string $long 经度
  14. * @property string $province 省
  15. * @property string $city 市
  16. * @property string $dist 区县
  17. * @property string $address 街道地址
  18. * @property string $floor 楼号门牌号
  19. * @property string $fullAddress 完整地址
  20. * @property string $showAddress 地图接口显示的完整地址
  21. * @property int $default 是否默认地址
  22. * @property string $addTime 添加时间
  23. * @property string $updateTime
  24. */
  25. class xhUserAddress extends \yii\db\ActiveRecord
  26. {
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public static function tableName()
  31. {
  32. return 'xhUserAddress';
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function rules()
  38. {
  39. return [
  40. [['userId', 'default'], 'integer'],
  41. [['addTime', 'updateTime'], 'safe'],
  42. [['lat', 'long'], 'string', 'max' => 20],
  43. [['name', 'phone', 'tag'], 'string', 'max' => 50],
  44. [['province', 'city', 'dist'], 'string', 'max' => 100],
  45. [['address', 'fullAddress'], 'string', 'max' => 500],
  46. [['floor'], 'string', 'max' => 50],
  47. [['showAddress'], 'string', 'max' => 900],
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'userId' => 'User ID',
  58. 'name' => 'Name',
  59. 'phone' => 'Phone',
  60. 'tag' => 'Tag',
  61. 'lat' => 'Lat',
  62. 'long' => 'Long',
  63. 'province' => 'Province',
  64. 'city' => 'City',
  65. 'dist' => 'Dist',
  66. 'address' => 'Address',
  67. 'floor' => 'Floor',
  68. 'fullAddress' => 'Full Address',
  69. 'showAddress' => 'Show Address',
  70. 'default' => 'Default',
  71. 'addTime' => 'Add Time',
  72. 'updateTime' => 'Update Time',
  73. ];
  74. }
  75. }