You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
1.8 KiB
80 lines
1.8 KiB
<?php
|
|
/**
|
|
* +----------------------------------------------------------------------
|
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
* +----------------------------------------------------------------------
|
|
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
|
* +----------------------------------------------------------------------
|
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
* +----------------------------------------------------------------------
|
|
* | Author: CRMEB Team <admin@crmeb.com>
|
|
* +----------------------------------------------------------------------
|
|
*/
|
|
|
|
/**
|
|
* 年级管理
|
|
* @author crud自动生成代码
|
|
* @date 2023/10/13 10:40:08
|
|
*/
|
|
|
|
namespace app\model\crud;
|
|
|
|
|
|
use crmeb\basic\BaseModel;
|
|
|
|
/**
|
|
* Class SchoolGrade
|
|
* @date 2023/10/13
|
|
* @package app\model\crud
|
|
*/
|
|
class SchoolGrade extends BaseModel
|
|
{
|
|
|
|
/**
|
|
* 表名
|
|
* @var string
|
|
*/
|
|
protected $name = 'school_grade';
|
|
|
|
/**
|
|
* 主键
|
|
* @var string
|
|
*/
|
|
protected $pk = 'id';
|
|
|
|
/**
|
|
* 添加时间获取器
|
|
* @date 2023-10-13
|
|
* @param string $value
|
|
* @return string
|
|
*/
|
|
public function getCreateTimeLabelAttr($value)
|
|
{
|
|
$value = $value ? json_decode($value, true) : [];
|
|
return $value;
|
|
}
|
|
|
|
/**
|
|
* 修改时间获取器
|
|
* @date 2023-10-13
|
|
* @param string $value
|
|
* @return string
|
|
*/
|
|
public function getUpdateTimeLabelAttr($value)
|
|
{
|
|
$value = $value ? json_decode($value, true) : [];
|
|
return $value;
|
|
}
|
|
|
|
|
|
/**
|
|
* 学校ID一对一关联
|
|
* @date 2023/10/13
|
|
* @return \think\model\relation\HasOne
|
|
*/
|
|
public function schoolIdHasOne()
|
|
{
|
|
return $this->hasOne(\app\model\crud\School::class, 'id', 'school_id');
|
|
}
|
|
|
|
}
|
|
|