文件
yjyf/server/application/admin/model/InvoiceTitle.php
MiAn fafddceaf2 feat: 新增发票抬头、晒单、钱包日志等模型及后台管理功能
- 新增 invoice_title、showcase、wallet_log 模型及对应语言包
- 新增后台控制器、视图及搜索字段配置
- 修复服务类目删除保护逻辑
- 优化后台登录页面文案及样式
- 新增前端角色切换逻辑及页面拦截
- 新增 SVG 图标及样式变量
- 修复接口权限及下拉框默认值问题
2026-11-11 17:02:35 +08:00

42 行
927 B
PHP

<?php
namespace app\admin\model;
use think\Model;
class InvoiceTitle extends Model
{
protected $name = 'invoice_title';
protected $autoWriteTimestamp = 'integer';
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
public function getTitleTypeList()
{
return [
'enterprise' => '企业单位',
'personal' => '个人/非企业',
];
}
public function getDefaultInvoiceTypeList()
{
return [
'normal' => '增值税普通发票',
'special' => '增值税专用发票',
];
}
public function user()
{
return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function merchant()
{
return $this->belongsTo('Merchant', 'merchant_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}