更新数据关联查询,以及基本的数据的编辑,部分有待进一步完善。
This commit is contained in:
@@ -32,6 +32,42 @@ class PdmPartitemRelation extends Model
|
||||
{
|
||||
return $this->hasOne(\app\common\model\system\Admin::Class,'id','creatorid')->bind(['name','nickname']);
|
||||
}
|
||||
/**
|
||||
* 定义 sa_pdm_partitem_index 关联模型
|
||||
* @localKey partnumber
|
||||
* @bind description,value,purchasecode
|
||||
*/
|
||||
public function pdmPartitemIndex()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmPartitemIndex::Class,'partnumber','partnumber')->bind(['description','value','purchasecode']);
|
||||
}
|
||||
/**
|
||||
* 定义 sa_pdm_symbol 关联模型
|
||||
* @localKey symbolid
|
||||
* @bind symbolname,view,attachment
|
||||
*/
|
||||
public function pdmSymbol()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmSymbol::Class,'id','symbolid')->bind(['symbolname','view','attachment']);
|
||||
}
|
||||
/**
|
||||
* 定义 sa_pdm_footprint 关联模型
|
||||
* @localKey footprintid
|
||||
* @bind footprint,manufacture,view,attachment
|
||||
*/
|
||||
public function pdmFootprint()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmFootprint::Class,'id','footprintid')->bind(['footprint','manufacture','view','attachment']);
|
||||
}
|
||||
/**
|
||||
* 定义 sa_department 关联模型
|
||||
* @localKey departmentid
|
||||
* @bind title
|
||||
*/
|
||||
public function department()
|
||||
{
|
||||
return $this->hasOne(\app\common\model\system\Department::Class,'id','departmentid')->bind(['title']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user