AddressEntity.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <?php
  2. namespace app\entity\data\user;
  3. use app\entity\data\DataEntity;
  4. class AddressEntity extends DataEntity
  5. {
  6. public $addressId = 0; // 用户地址id
  7. public $uid = 0; // 用户id
  8. public $realName = ''; // 收货人姓名
  9. public $phone = ''; // 收货人电话
  10. public $province = ''; // 收货人所在省
  11. public $city = ''; // 收货人所在市
  12. public $cityId = 0; // 城市id
  13. public $district = ''; // 收货人所在区
  14. public $village = ''; // 收货人所在村
  15. public $villageId = 0; // 村id
  16. public $detail = ''; // 收货人详细地址
  17. public $postCode = 0; // 邮编
  18. public $longitude = '0'; // 经度
  19. public $latitude = '0'; // 纬度
  20. public $isDefault = 0; // 是否默认
  21. public $isDel = 0; // 是否删除
  22. public $createTime = null; // 添加时间
  23. public $codeList = ''; // 地址id(regions)
  24. public $codeListByDecode = []; // 地址id(regions)
  25. public function getAddressId(): int
  26. {
  27. return $this->addressId;
  28. }
  29. public function setAddressId(int $addressId): AddressEntity
  30. {
  31. $this->addressId = $addressId;
  32. return $this;
  33. }
  34. public function getUid(): int
  35. {
  36. return $this->uid;
  37. }
  38. public function setUid(int $uid): AddressEntity
  39. {
  40. $this->uid = $uid;
  41. return $this;
  42. }
  43. public function getRealName(): string
  44. {
  45. return $this->realName;
  46. }
  47. public function setRealName(string $realName): AddressEntity
  48. {
  49. $this->realName = $realName;
  50. return $this;
  51. }
  52. public function getPhone(): string
  53. {
  54. return $this->phone;
  55. }
  56. public function setPhone(string $phone): AddressEntity
  57. {
  58. $this->phone = $phone;
  59. return $this;
  60. }
  61. public function getProvince(): string
  62. {
  63. return $this->province;
  64. }
  65. public function setProvince(string $province): AddressEntity
  66. {
  67. $this->province = $province;
  68. return $this;
  69. }
  70. public function getCity(): string
  71. {
  72. return $this->city;
  73. }
  74. public function setCity(string $city): AddressEntity
  75. {
  76. $this->city = $city;
  77. return $this;
  78. }
  79. public function getCityId(): int
  80. {
  81. return $this->cityId;
  82. }
  83. public function setCityId(int $cityId): AddressEntity
  84. {
  85. $this->cityId = $cityId;
  86. return $this;
  87. }
  88. public function getDistrict(): string
  89. {
  90. return $this->district;
  91. }
  92. public function setDistrict(string $district): AddressEntity
  93. {
  94. $this->district = $district;
  95. return $this;
  96. }
  97. public function getVillage(): string
  98. {
  99. return $this->village;
  100. }
  101. public function setVillage(string $village): AddressEntity
  102. {
  103. $this->village = $village;
  104. return $this;
  105. }
  106. public function getVillageId(): int
  107. {
  108. return $this->villageId;
  109. }
  110. public function setVillageId(int $villageId): AddressEntity
  111. {
  112. $this->villageId = $villageId;
  113. return $this;
  114. }
  115. public function getDetail(): string
  116. {
  117. return $this->detail;
  118. }
  119. public function setDetail(string $detail): AddressEntity
  120. {
  121. $this->detail = $detail;
  122. return $this;
  123. }
  124. public function getPostCode(): int
  125. {
  126. return $this->postCode;
  127. }
  128. public function setPostCode(int $postCode): AddressEntity
  129. {
  130. $this->postCode = $postCode;
  131. return $this;
  132. }
  133. public function getLongitude(): string
  134. {
  135. return $this->longitude;
  136. }
  137. public function setLongitude(string $longitude): AddressEntity
  138. {
  139. $this->longitude = $longitude;
  140. return $this;
  141. }
  142. public function getLatitude(): string
  143. {
  144. return $this->latitude;
  145. }
  146. public function setLatitude(string $latitude): AddressEntity
  147. {
  148. $this->latitude = $latitude;
  149. return $this;
  150. }
  151. public function getIsDefault(): int
  152. {
  153. return $this->isDefault;
  154. }
  155. public function setIsDefault(int $isDefault): AddressEntity
  156. {
  157. $this->isDefault = $isDefault;
  158. return $this;
  159. }
  160. public function getIsDel(): int
  161. {
  162. return $this->isDel;
  163. }
  164. public function setIsDel(int $isDel): AddressEntity
  165. {
  166. $this->isDel = $isDel;
  167. return $this;
  168. }
  169. /**
  170. * @return string
  171. */
  172. public function getCreateTime(): ?string
  173. {
  174. return $this->createTime;
  175. }
  176. /**
  177. * @param string $createTime
  178. * @return AddressEntity
  179. */
  180. public function setCreateTime(string $createTime): AddressEntity
  181. {
  182. $this->createTime = $createTime;
  183. return $this;
  184. }
  185. public function getCodeList(): string
  186. {
  187. return $this->codeList;
  188. }
  189. public function setCodeList(string $codeList): AddressEntity
  190. {
  191. $this->codeListByDecode = explode(',', $codeList);
  192. $this->codeList = $codeList;
  193. return $this;
  194. }
  195. public function getCodeListByDecode(): array
  196. {
  197. return $this->codeListByDecode;
  198. }
  199. public function setCodeListByDecode(array $codeListByDecode): AddressEntity
  200. {
  201. $this->codeListByDecode = $codeListByDecode;
  202. $this->codeList = implode(',', $codeListByDecode);
  203. return $this;
  204. }
  205. }