增加mfgname 的管理页面功能

This commit is contained in:
panx
2024-08-18 21:55:49 +08:00
parent f2b899bd0b
commit 3566f03653
5 changed files with 611 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace app\common\model;
use think\Model;
use think\model\concern\SoftDelete;
/**
* pdm_mfg_name
* <!--partmanage-->
* 制造商名录
* Class PdmMfgName
* @package app\common\model
*/
class PdmMfgName extends Model
{
use SoftDelete;
// 定义时间戳字段名
protected $createTime = 'create_time';
protected $updateTime = 'update_time';
protected $deleteTime = 'delete_time';
/**
* 定义 sa_user 关联模型
* @localKey createrid
* @bind name,nickname
*/
public function user()
{
return $this->hasOne(\app\common\model\system\User::Class,'id','createrid')->bind(['name','nickname']);
}
public function usernames()
{
// return \app\common\model\system\User::select()->toArray();
return \app\common\model\system\Admin::select()->toArray();
}
}