2024-05-23 15:12:35 +08:00

54 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\works\rcbg;
use app\common\model\BaseModel;
use think\model\concern\SoftDelete;
/**
* 工作记录模型
* Class OaSchedule
* @package app\common\model\works\rcbg
*/
class OaSchedule extends BaseModel
{
use SoftDelete;
protected $name = 'oa_schedule';
protected $deleteTime = 'delete_time';
public function getCidTextAttr($value,$data): string
{
$arr = [0=>'其他',1=>'方案策划',2=>'撰写文档',3=>'需求调研',4=>'需求沟通',5=>'参加会议',6=>'拜访客户',7=>'接待客户'];
return $arr[$data['cid']];
}
public function getLaborTypeTextAttr($value,$data): string
{
$arr = [1=>'案头', 2=>'外勤'];
return !empty($data['labor_type']) ? $arr[$data['labor_type']] : '';
}
public function getStartTimeAttr($value): string
{
return !empty($value) ? date('Y-m-d H:i',$value) : '';
}
public function getEndTimeAttr($value): string
{
return !empty($value) ? date('Y-m-d H:i',$value) : '';
}
}