Excel.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\model\store;
  12. use app\common\model\BaseModel;
  13. use app\common\model\system\merchant\MerchantAdmin;
  14. class Excel extends BaseModel
  15. {
  16. public $typeData = [
  17. 'order' => '订单列表',
  18. 'delivery' => '待发货订单',
  19. 'searchLog' => '搜索记录',
  20. 'financial' => '流水记录',
  21. 'refundOrder' => '退款单',
  22. 'integralLog' => '红包米日志',
  23. 'importDelivery' => '发货导入',
  24. 'exportFinancial' => '日/月账单',
  25. 'financialLog' => '转账记录',
  26. 'bill' => '资金记录',
  27. 'profitsharing' => '分账管理',
  28. 'extract' => '提现管理',
  29. ];
  30. /**
  31. * TODO
  32. * @return string
  33. * @author Qinii
  34. * @day 2020-07-30
  35. */
  36. public static function tablePk(): string
  37. {
  38. return 'excel_id';
  39. }
  40. /**
  41. * TODO
  42. * @return string
  43. * @author Qinii
  44. * @day 2020-07-30
  45. */
  46. public static function tableName(): string
  47. {
  48. return 'excel';
  49. }
  50. public function merAdmin()
  51. {
  52. return $this->hasOne(MerchantAdmin::class,'merchant_admin_id','admin_id');
  53. }
  54. public function getPathAttr($value)
  55. {
  56. return $value ? systemConfig('site_url').$value : '';
  57. }
  58. public function getTypeAttr($value)
  59. {
  60. if ($value) {
  61. return $this->typeData[$value];
  62. }
  63. return '';
  64. }
  65. }