prolab-api/console/models/ResultCodeMapping.php

66 lines
1.5 KiB
PHP

<?php
namespace console\models;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "result_code_mapping".
*
* @property string|null $TestID
* @property string $TestCode
* @property string|null $TestName
* @property string|null $PROLAB_LabID
* @property string|null $LISName
* @property string|null $ResultCode
* @property string|null $ResultName
*/
class ResultCodeMapping extends ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'result_code_mapping';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['TestCode'], 'required'],
[['TestName', 'ResultName'], 'string'],
[['TestID', 'LISName'], 'string', 'max' => 20],
[['TestCode', 'PROLAB_LabID', 'ResultCode'], 'string', 'max' => 50],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'TestID' => 'Test ID',
'TestCode' => 'Test Code',
'TestName' => 'Test Name',
'PROLAB_LabID' => 'PROLAB Lab ID',
'LISName' => 'LIS Name',
'ResultCode' => 'Result Code',
'ResultName' => 'Result Name',
];
}
/**
* กรณีตารางไม่มี primary key
*/
public static function primaryKey()
{
return ['TestCode', 'ResultCode'];
}
}