DActivity.Class.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * 促销活动
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/12/18
  7. * Time: 11:58
  8. */
  9. namespace JinDouYun\Dao\Market;
  10. use JinDouYun\Dao\BaseDao;
  11. class DActivity extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'activity';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
  19. "activityType",//tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '活动类型(10商品特价 20商品秒杀)',
  20. "title",//varchar(255) NOT NULL DEFAULT '' COMMENT '活动标题',
  21. "startTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动开始时间',
  22. "endTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活动结束时间',
  23. "images",//json DEFAULT NULL COMMENT '促销活动图',
  24. "enableStatus",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '活动上下架(5上架 4下架)',
  25. "useShop",//varchar(255) NOT NULL DEFAULT '' COMMENT '使用范围',
  26. "remark",// varchar(255) NOT NULL DEFAULT '' COMMENT '客户沟通',
  27. "customerRange",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '客户范围(5全部 4部分)',
  28. "customerSourceId",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'customerRange:4--客户id',
  29. "sort",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越大越靠前)',
  30. "describe",//text NOT NULL COMMENT '活动详情',
  31. "createTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  32. "updateTime",//int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  33. "isEnd",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '是否结束(5未结束 4已结束)',
  34. "deleteStatus",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '软删除(5未删除 4已删除)',
  35. "auditStatus",//tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '审核状态(1待审 2审核通过 3未通过 4审核中)',
  36. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  37. "isMutex",//tinyint(3) unsigned NOT NULL DEFAULT '5' COMMENT '是否互斥(5是 4否)',
  38. ];
  39. $this->_readonly = ['id'];
  40. $this->_create_autofill = [
  41. 'createTime' => time()
  42. ];
  43. $this->_update_autofill = [
  44. 'updateTime' => time()
  45. ];
  46. parent::__construct($serviceDB);
  47. }
  48. }