DMeal.Class.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * OEM套餐Dao
  4. * Created by PhpStorm.
  5. * User: luli
  6. * Date: 2021/7/12
  7. * Time: 12:00
  8. */
  9. namespace JinDouYun\Dao\Agent;
  10. use JinDouYun\Dao\BaseDao;
  11. class DMeal extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'oem_meal';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id",// int(10) NOT NULL AUTO_INCREMENT COMMENT '套餐主键id',
  19. "name", //varchar(50) NOT NULL COMMENT '套餐名',
  20. "price", //decimal(15,4) DEFAULT '0.0000' COMMENT '价格',
  21. "content", //text COMMENT '说明',
  22. "createTime", //int(11) DEFAULT NULL COMMENT '创建日期',
  23. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  24. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
  25. ];
  26. $this->_readonly = ['id'];
  27. $this->_create_autofill = [
  28. 'createTime' => time()
  29. ];
  30. $this->_update_autofill = [
  31. 'updateTime' => time()
  32. ];
  33. parent::__construct($serviceDB);
  34. }
  35. }