PMC-885
This commit is contained in:
@@ -14,8 +14,13 @@ use Illuminate\Support\Facades\DB;
|
||||
class Dynaform extends Model
|
||||
{
|
||||
protected $table = 'DYNAFORM';
|
||||
protected $primaryKey = "DYN_ID";
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Return relation process.
|
||||
* @return object
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
return $this->belongsTo(Process::class, 'PRO_UID', 'PRO_UID');
|
||||
|
||||
45
workflow/engine/src/ProcessMaker/Model/InputDocument.php
Normal file
45
workflow/engine/src/ProcessMaker/Model/InputDocument.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Represents a input document object in the system.
|
||||
*/
|
||||
class InputDocument extends Model
|
||||
{
|
||||
protected $table = 'INPUT_DOCUMENT';
|
||||
protected $primaryKey = 'INP_DOC_ID';
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Return relation process.
|
||||
* @return object
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
return $this->belongsTo(Process::class, 'PRO_UID', 'PRO_UID');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get input documents by PRO_UID
|
||||
* @param string $proUid
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public static function getByProUid($proUid)
|
||||
{
|
||||
return InputDocument::where('PRO_UID', '=', $proUid)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get input document by INP_DOC_UID
|
||||
* @param type $inpDocUid
|
||||
* @return Model
|
||||
*/
|
||||
public static function getByInpDocUid($inpDocUid)
|
||||
{
|
||||
return InputDocument::where('INP_DOC_UID', '=', $inpDocUid)->first();
|
||||
}
|
||||
}
|
||||
45
workflow/engine/src/ProcessMaker/Model/OutputDocument.php
Normal file
45
workflow/engine/src/ProcessMaker/Model/OutputDocument.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Represents a output document object in the system.
|
||||
*/
|
||||
class OutputDocument extends Model
|
||||
{
|
||||
protected $table = 'OUTPUT_DOCUMENT';
|
||||
protected $primaryKey = 'OUT_DOC_ID';
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Return relation process.
|
||||
* @return object
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
return $this->belongsTo(Process::class, 'PRO_UID', 'PRO_UID');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output documents by PRO_UID.
|
||||
* @param string $proUid
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public static function getByProUid($proUid)
|
||||
{
|
||||
return OutputDocument::where('PRO_UID', '=', $proUid)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output document by OUT_DOC_UID.
|
||||
* @param string $outDocUid
|
||||
* @return Model
|
||||
*/
|
||||
public static function getByOutDocUid($outDocUid)
|
||||
{
|
||||
return OutputDocument::where('OUT_DOC_UID', '=', $outDocUid)->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user