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.
33 lines
695 B
33 lines
695 B
1 year ago
|
<?php
|
||
|
|
||
|
|
||
|
namespace app\common\model;
|
||
|
|
||
|
|
||
|
use think\Model;
|
||
|
|
||
|
class ProjectMaterial extends Model
|
||
|
{
|
||
|
// 表名
|
||
|
protected $name = 'project_material';
|
||
|
// 开启自动写入时间戳字段
|
||
|
protected $autoWriteTimestamp = 'int';
|
||
|
|
||
|
protected $resultSetType = 'collection';
|
||
|
|
||
|
protected $type = [
|
||
|
'material_config' => 'json'
|
||
|
];
|
||
|
|
||
|
public static function getList() {
|
||
|
return self::field('id,name,material_config')->select();
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 查询多个模板配置
|
||
|
* @param $material_ids
|
||
|
*/
|
||
|
public static function getInfoByIds($material_ids) {
|
||
|
return self::field('id,name,material_config')->whereIn('id', $material_ids)->select();
|
||
|
}
|
||
|
}
|