DOemDetails.Class.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Gss
  5. * Date: 2021/7/13 0013
  6. * Time: 15:00
  7. */
  8. namespace JinDouYun\Dao\Agent;
  9. use JinDouYun\Dao\BaseDao;
  10. class DOemDetails extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = 'qianniao_oem_details';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id',//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
  18. 'enterpriseId',//int(11) NOT NULL COMMENT '企业id',
  19. 'enterpriseName',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '企业名称',
  20. 'mealId',// int(11) NOT NULL DEFAULT '0' COMMENT '套餐id',
  21. 'meal',// varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '套餐名称',
  22. 'mobile',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '手机号',
  23. 'type',//varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消费类型',
  24. 'beforeMoney',//decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '消费前余额',
  25. 'money',//decimal(11,2) NOT NULL COMMENT '余额',
  26. 'afterMoney',//decimal(11,2) NOT NULL COMMENT '消费后余额',
  27. 'explain',//varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '说明',
  28. 'createTime',//int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  29. 'extend',//json DEFAULT NULL COMMENT '扩展字段',
  30. ];
  31. $this->_readonly = ['id'];
  32. $this->_create_autofill = [
  33. 'createTime' => time()
  34. ];
  35. $this->_update_autofill = [
  36. 'updateTime' => time()
  37. ];
  38. parent::__construct($serviceDB);
  39. }
  40. }