DCustomer.Class.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace JinDouYun\Dao\Customer;
  3. use JinDouYun\Dao\BaseDao;
  4. class DCustomer extends BaseDao
  5. {
  6. public function __construct($serviceDB = 'default')
  7. {
  8. $this->_table = 'customer';
  9. $this->_primary = 'id';
  10. $this->_fields = [
  11. "id", //int(11) NOT NULL AUTO_INCREMENT COMMENT '客户信息id',
  12. "userCenterId", //int(11) DEFAULT NULL COMMENT '客户id',
  13. "enterpriseId", //int(11) NOT NULL COMMENT '企业id',
  14. "shopId", //int(11) DEFAULT NULL COMMENT '商铺id',
  15. "departmentId", //int(11) DEFAULT NULL COMMENT '销售部门id',
  16. "integral", //decimal(10,2) DEFAULT '0.00' COMMENT '积分',
  17. "integralTotal", //decimal(10,2) DEFAULT '0.00' COMMENT '累计积分',
  18. "status", //tinyint(1) DEFAULT NULL COMMENT '账号状态( 0待补全 1待审核 2已审核 3未通过 4审核中)',
  19. "auditFailReason", //text CHARACTER SET utf8 COMMENT '审核拒绝原因',
  20. "name", //varchar(50) NOT NULL COMMENT '客户名称',
  21. "code", //varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '客户编码',
  22. "condition", //varchar(255) DEFAULT NULL COMMENT '搜索条件',
  23. "avatar", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '客户头像',
  24. "type", //tinyint(3) DEFAULT NULL COMMENT '客户类型',
  25. "reservoirId", //int(10) DEFAULT NULL COMMENT '库位id',
  26. "provinceCode", //varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '客户地址省编码',
  27. "cityCode", //varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '客户地址市编码',
  28. "districtCode", //varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '客户地址区编码',
  29. "address", //varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '客户地址详细地址',
  30. "managerMobile", //varchar(11) CHARACTER SET utf8 DEFAULT NULL COMMENT '负责人电话',
  31. "salesManId", //int(10) DEFAULT NULL COMMENT '业务员id',
  32. "salesManCode", //varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '业务员编码',
  33. "salesManName", //varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '业务员名称',
  34. "birthday", //int(10) DEFAULT NULL COMMENT '客户生日',
  35. "enableStatus", //int(1) DEFAULT '5' COMMENT '启用状态(5启用 4禁用)',
  36. "deleteStatus", //int(1) DEFAULT '5' COMMENT '删除状态(5未删除 4已删除)',
  37. "isCommission", //tinyint(1) DEFAULT '4' COMMENT '是否是分销商 4:不是 5:是',
  38. "commissionPath", //json DEFAULT NULL COMMENT '等级路径 例: 1:5, 2:3, 3:1',
  39. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  40. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  41. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  42. "taglib", //json DEFAULT NULL COMMENT '客户指定标签',
  43. "remark", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
  44. "longitude", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '经度',
  45. "latitude", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '纬度',
  46. "openId", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '微信openId',
  47. "unionId", //varchar(255) DEFAULT NULL COMMENT '微信unionId',
  48. "byteOpenId", //varchar(255) DEFAULT NULL COMMENT '抖音openId',
  49. "money", //decimal(15,4) DEFAULT '0.0000' COMMENT '当前余额',
  50. "totalPayMoney", //decimal(15,4) DEFAULT '0.0000' COMMENT '总付款金额',
  51. "payPassword", //varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '余额支付密码',
  52. "recommenderType",// tinyint(3) NOT NULL DEFAULT '4' COMMENT '推荐人类型 2, 员工 3, 客户',
  53. "recommenderId",// int(10) DEFAULT NULL COMMENT '推荐人id',
  54. 'is_shareholder',// tinyint DEFAULT '0' COMMENT '是否是股东',
  55. ];
  56. $this->_readonly = ['id'];
  57. $this->_create_autofill = [
  58. 'createTime' => time()
  59. ];
  60. $this->_update_autofill = [
  61. 'updateTime' => time()
  62. ];
  63. parent::__construct($serviceDB);
  64. }
  65. }