DShippingAddress.Class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * 客户收货地址管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/10/31
  7. * Time: 11:30
  8. */
  9. namespace JinDouYun\Dao\Customer;
  10. use JinDouYun\Dao\BaseDao;
  11. class DShippingAddress extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'customer_shipping_address';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "customerId", //int(10) NOT NULL COMMENT '客户id',
  20. "customerCode", //varchar(50) NOT NULL COMMENT '客户编码',
  21. "name", //varchar(30) DEFAULT NULL COMMENT '客户收货姓名',
  22. "mobile", //char(11) DEFAULT NULL COMMENT '客户收货手机号',
  23. "provinceCode", //varchar(50) DEFAULT NULL COMMENT '客户收货地址省份编码',
  24. "cityCode", //varchar(50) DEFAULT NULL COMMENT '客户收货地址城市编码',
  25. "districtCode", //varchar(50) DEFAULT NULL COMMENT '客户收货地址区县编码',
  26. "address", // varchar(255) DEFAULT NULL COMMENT '详细收货地址',
  27. "defaultStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '默认状态 5:默认 4:不是默认',
  28. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '删除状态 5:正常 4:删除',
  29. "createTime", //int(10) NOT NULL COMMENT '创建时间',
  30. "updateTime", //int(10) NOT NULL COMMENT '修改时间',
  31. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  32. ];
  33. $this->_readonly = ['id'];
  34. $this->_create_autofill = [
  35. 'createTime' => time()
  36. ];
  37. $this->_update_autofill = [
  38. 'updateTime' => time()
  39. ];
  40. parent::__construct($serviceDB);
  41. }
  42. }