prolab-api/common/models/CoPathologist.php

78 lines
1.7 KiB
PHP

<?php
namespace common\models;
use Yii;
use yii\behaviors\BlameableBehavior;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "co_pathologist".
*
* @property int $id
* @property string $id_case
* @property int $pathologist_id
* @property string $report_type
* @property int|null $created_at
* @property int|null $updated_at
* @property int|null $created_by
* @property int|null $updated_by
*/
class CoPathologist extends \yii\db\ActiveRecord
{
public $items;
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'co_pathologist';
}
public function behaviors()
{
return [
TimestampBehavior::class,
BlameableBehavior::class,
];
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['id_case', 'pathologist_id', 'report_type'], 'required'],
[['pathologist_id', 'created_at', 'updated_at', 'created_by', 'updated_by'], 'integer'],
[['id_case'], 'string', 'max' => 20],
[['report_type'], 'string', 'max' => 50],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'id_case' => 'Id Case',
'pathologist_id' => 'Pathologist ID',
'report_type' => 'Report Type',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'created_by' => 'Created By',
'updated_by' => 'Updated By',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPathologistCo()
{
return $this->hasOne(User::class, ['id' => 'pathologist_id']);
}
}