DShop.Class.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * 商铺管理模块
  4. * Created by PhpStorm.
  5. * User: wxj
  6. * Date: 2019/10/31
  7. * Time: 15:02
  8. */
  9. namespace JinDouYun\Dao\Shop;
  10. use JinDouYun\Dao\BaseDao;
  11. class DShop extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'shop';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(11) NOT NULL AUTO_INCREMENT COMMENT '商铺id',
  19. "enterpriseId", //int(11) NOT NULL COMMENT '企业实体id',
  20. "merchantId", //int(10) DEFAULT NULL COMMENT '商户id',
  21. "warehouseId", //int(11) DEFAULT NULL COMMENT '仓库id',
  22. "name", //varchar(255) DEFAULT NULL COMMENT '商铺名称',
  23. "token", //varchar(255) DEFAULT NULL COMMENT '商铺token',
  24. "costType", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '1:移动加权平均法 2:个别计价法',
  25. "logo", //varchar(255) NOT NULL COMMENT '商铺logo',
  26. "shopCode", //varchar(255) DEFAULT NULL COMMENT '商铺仓库编码',
  27. "shopType", //int(10) DEFAULT NULL COMMENT '商铺类型',
  28. "openTime", //json DEFAULT NULL COMMENT '营业时间',
  29. "contactName", //varchar(50) NOT NULL COMMENT '联系人',
  30. "mobile", //char(11) NOT NULL COMMENT '联系电话',
  31. "deleteStatus", //tinyint(4) DEFAULT '5' COMMENT '删除状态(5未删除 4已删除)',
  32. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  33. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  34. "enableStatus", //tinyint(4) DEFAULT '5' COMMENT '启用状态(4未启用 5已启用)',
  35. "isMaster", //tinyint(1) DEFAULT '4' COMMENT '总店 4:否 5:是',
  36. "provinceCode", //varchar(20) DEFAULT NULL COMMENT '省编码',
  37. "cityCode", //varchar(20) DEFAULT NULL COMMENT '市编码',
  38. "districtCode", //varchar(20) DEFAULT NULL COMMENT '区编码',
  39. "address", //varchar(100) DEFAULT NULL COMMENT '详细地址',
  40. "latitude", //varchar(255) DEFAULT NULL COMMENT '纬度',
  41. "longitude", //varchar(255) DEFAULT NULL COMMENT '经度',
  42. "salesArea", //json DEFAULT NULL COMMENT '销售区域',
  43. "managerId", //int(11) DEFAULT NULL COMMENT '店长userCenterId',
  44. "describe", //varchar(255) DEFAULT '' COMMENT '店铺描述',
  45. "extends",
  46. "modelType",
  47. "recommend_user_id"
  48. ];
  49. $this->_readonly = ['id'];
  50. $this->_create_autofill = [
  51. 'createTime' => time()
  52. ];
  53. $this->_update_autofill = [
  54. 'updateTime' => time()
  55. ];
  56. parent::__construct($serviceDB);
  57. }
  58. }