new-admin-api/app/model/supplier/SystemSupplierApply.php

38 lines
762 B
PHP

<?php
namespace app\model\supplier;
use app\common\model\marketing\Agent;
use crmeb\basic\BaseModel;
use crmeb\traits\ModelTrait;
class SystemSupplierApply extends BaseModel{
use ModelTrait;
protected $pk = 'id';
protected $name = 'system_supplier_apply';
public function setCorporationIdCardAttr($value){
return implode(',',$value);
}
public function setChairmanIdCardAttr($value){
return implode(',',$value);
}
public function getCorporationIdCardAttr($value){
return explode(',',$value);
}
public function getChairmanIdCardAttr($value){
return explode(',',$value);
}
public function agent(){
return $this->hasOne(Agent::class,'id','invite_agent_id');
}
}