PDM更新数据结构后,基础数据查询和BOM初始查询等基本功能都已经OK,待完善和细化相关的上传和下载服务等。
This commit is contained in:
35
app/admin/model/partview/Partview.php
Normal file
35
app/admin/model/partview/Partview.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\admin\model\partview;
|
||||
|
||||
use think\Model;
|
||||
/**
|
||||
* 部件查询模型类
|
||||
* <!--Partview-->
|
||||
* @mixin Model
|
||||
*/
|
||||
class Partview extends Model
|
||||
{
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'int';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'create_time';
|
||||
protected $updatetime = 'update_time';
|
||||
|
||||
/**
|
||||
* 字段修改器
|
||||
* @param $value
|
||||
* @return int|mixed
|
||||
*/
|
||||
public function setSortAttr($value)
|
||||
{
|
||||
if (is_empty($value)) {
|
||||
return self::max('id') + 1;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user