DWarehouse.Class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 仓库管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/08
  7. * Time: 14:30
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DWarehouse extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'warehouse';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "shopId", //int(10) DEFAULT NULL COMMENT '商铺Id',
  20. "warehouseCode", //varchar(50) DEFAULT NULL COMMENT '仓库编码',
  21. "warehouseName", //varchar(255) DEFAULT NULL COMMENT '仓库名称',
  22. "contactName", //varchar(255) DEFAULT NULL COMMENT '联系人姓名',
  23. "contactMobile", //char(11) DEFAULT NULL COMMENT '联系方式/手机号',
  24. "provinceCode", //int(10) DEFAULT NULL COMMENT '省份编码',
  25. "cityCode", //int(10) DEFAULT NULL COMMENT '城市编码',
  26. "districtCode", //int(10) DEFAULT NULL COMMENT '区县编码',
  27. "contactAddress", //varchar(255) DEFAULT NULL COMMENT '仓库地址',
  28. "remarks", //varchar(255) DEFAULT NULL COMMENT '备注',
  29. "beginningStatus", // tinyint(3) NOT NULL DEFAULT '5' COMMENT '期初状态 5:正常 4:禁用',
  30. "enableStatus", //tinyint(3) DEFAULT '5' COMMENT '启用状态 4:未启用 5:启用',
  31. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  32. "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
  33. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  34. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  35. ];
  36. $this->_readonly = ['id'];
  37. $this->_create_autofill = [
  38. 'createTime' => time()
  39. ];
  40. $this->_update_autofill = [
  41. 'updateTime' => time()
  42. ];
  43. parent::__construct($serviceDB);
  44. }
  45. }