<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "RiaFrmH_VLAB".
 *
 * @property string $RiaHDocDate
 * @property string $RiaHDocID
 * @property string|null $PatName
 * @property float|null $PatAge
 * @property string|null $PatHN
 * @property string|null $PatWard
 * @property string|null $CustID
 * @property string|null $CustTitle
 * @property string|null $CustName
 * @property string|null $CustFax
 * @property int|null $RiaHPaySts
 * @property float|null $RiaHCrDay
 * @property string|null $RiaHReqBy
 * @property string|null $RiaHRemark
 * @property string|null $CsHDocID
 * @property float|null $RiaHSUPrice
 * @property int $RiaHDataFlag
 * @property int $RiaHReEntryFlag
 * @property string|null $UserIDEntry
 * @property string|null $UserDateEntry
 * @property string|null $UserIDReEntry
 * @property string|null $UserDateReEntry
 * @property int $RiaLHGRFlag
 * @property int|null $CustLabQty
 * @property int $RiaLHPreExpFlag
 * @property int $RiaLHExpFlag
 * @property string|null $PatAgeType
 * @property string|null $PatAgeDesc
 * @property int|null $RiaHRepType
 * @property string|null $Sex
 * @property int|null $RiaHMsightFlag
 */
class RiaFrmHVLAB extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'RiaFrmH_VLAB';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('prolab');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['RiaHDocDate', 'RiaHDocID', 'RiaHDataFlag', 'RiaHReEntryFlag', 'RiaLHGRFlag', 'RiaLHPreExpFlag', 'RiaLHExpFlag'], 'required'],
            [['RiaHDocDate', 'UserDateEntry', 'UserDateReEntry'], 'safe'],
            [['PatAge', 'RiaHCrDay', 'RiaHSUPrice'], 'number'],
            [['RiaHPaySts', 'RiaHDataFlag', 'RiaHReEntryFlag', 'RiaLHGRFlag', 'CustLabQty', 'RiaLHPreExpFlag', 'RiaLHExpFlag', 'RiaHRepType', 'RiaHMsightFlag'], 'integer'],
            [['RiaHDocID', 'PatWard', 'CustTitle'], 'string', 'max' => 50],
            [['PatName', 'CustName', 'CustFax', 'RiaHReqBy'], 'string', 'max' => 100],
            [['PatHN', 'CsHDocID', 'UserIDEntry', 'UserIDReEntry', 'PatAgeDesc'], 'string', 'max' => 20],
            [['CustID'], 'string', 'max' => 4],
            [['RiaHRemark'], 'string', 'max' => 150],
            [['PatAgeType', 'Sex'], 'string', 'max' => 1],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'RiaHDocDate' => 'Ria H Doc Date',
            'RiaHDocID' => 'Ria H Doc ID',
            'PatName' => 'Pat Name',
            'PatAge' => 'Pat Age',
            'PatHN' => 'Pat Hn',
            'PatWard' => 'Pat Ward',
            'CustID' => 'Cust ID',
            'CustTitle' => 'Cust Title',
            'CustName' => 'Cust Name',
            'CustFax' => 'Cust Fax',
            'RiaHPaySts' => 'Ria H Pay Sts',
            'RiaHCrDay' => 'Ria H Cr Day',
            'RiaHReqBy' => 'Ria H Req By',
            'RiaHRemark' => 'Ria H Remark',
            'CsHDocID' => 'Cs H Doc ID',
            'RiaHSUPrice' => 'Ria Hsu Price',
            'RiaHDataFlag' => 'Ria H Data Flag',
            'RiaHReEntryFlag' => 'Ria H Re Entry Flag',
            'UserIDEntry' => 'User Id Entry',
            'UserDateEntry' => 'User Date Entry',
            'UserIDReEntry' => 'User Id Re Entry',
            'UserDateReEntry' => 'User Date Re Entry',
            'RiaLHGRFlag' => 'Ria Lhgr Flag',
            'CustLabQty' => 'Cust Lab Qty',
            'RiaLHPreExpFlag' => 'Ria Lh Pre Exp Flag',
            'RiaLHExpFlag' => 'Ria Lh Exp Flag',
            'PatAgeType' => 'Pat Age Type',
            'PatAgeDesc' => 'Pat Age Desc',
            'RiaHRepType' => 'Ria H Rep Type',
            'Sex' => 'Sex',
            'RiaHMsightFlag' => 'Ria H Msight Flag',
        ];
    }
}