<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "RiaFrmD_vlab".
 *
 * @property string $RiaHDocDate
 * @property string $RiaHDocID
 * @property int $RiaDSeq
 * @property int $LabSetFlag
 * @property string|null $LabID
 * @property string|null $LabName
 * @property string|null $SpecID
 * @property string|null $SpecName
 * @property float|null $RiaDUPrice
 * @property string|null $LabTID
 * @property string|null $LabGrpID
 * @property string|null $LabSubID
 * @property int|null $RiaDTubNbr
 * @property int|null $RiaDInOut
 * @property string|null $UserIDEntry
 * @property string|null $UserDateEntry
 * @property int $RiaDReEntryFlag
 * @property string|null $UserIDReEntry
 * @property string|null $UserDateReEntry
 * @property int $CustLabSpPriceFlag
 * @property float|null $LabUPrice
 * @property string|null $LabAbbr
 * @property string|null $LabSubName
 * @property int $LabDescFlag
 * @property int $LabAddResultFlag
 */
class RiaFrmDVlab extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'RiaFrmD_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', 'RiaDSeq', 'LabSetFlag', 'RiaDReEntryFlag', 'CustLabSpPriceFlag', 'LabDescFlag', 'LabAddResultFlag'], 'required'],
            [['RiaHDocDate', 'UserDateEntry', 'UserDateReEntry'], 'safe'],
            [['RiaDSeq', 'LabSetFlag', 'RiaDTubNbr', 'RiaDInOut', 'RiaDReEntryFlag', 'CustLabSpPriceFlag', 'LabDescFlag', 'LabAddResultFlag'], 'integer'],
            [['RiaDUPrice', 'LabUPrice'], 'number'],
            [['RiaHDocID', 'LabID', 'UserIDEntry', 'UserIDReEntry', 'LabAbbr'], 'string', 'max' => 20],
            [['LabName', 'SpecName', 'LabSubName'], 'string', 'max' => 100],
            [['SpecID', 'LabSubID'], 'string', 'max' => 4],
            [['LabTID', 'LabGrpID'], 'string', 'max' => 2],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'RiaHDocDate' => 'Ria H Doc Date',
            'RiaHDocID' => 'Ria H Doc ID',
            'RiaDSeq' => 'Ria D Seq',
            'LabSetFlag' => 'Lab Set Flag',
            'LabID' => 'Lab ID',
            'LabName' => 'Lab Name',
            'SpecID' => 'Spec ID',
            'SpecName' => 'Spec Name',
            'RiaDUPrice' => 'Ria Du Price',
            'LabTID' => 'Lab Tid',
            'LabGrpID' => 'Lab Grp ID',
            'LabSubID' => 'Lab Sub ID',
            'RiaDTubNbr' => 'Ria D Tub Nbr',
            'RiaDInOut' => 'Ria D In Out',
            'UserIDEntry' => 'User Id Entry',
            'UserDateEntry' => 'User Date Entry',
            'RiaDReEntryFlag' => 'Ria D Re Entry Flag',
            'UserIDReEntry' => 'User Id Re Entry',
            'UserDateReEntry' => 'User Date Re Entry',
            'CustLabSpPriceFlag' => 'Cust Lab Sp Price Flag',
            'LabUPrice' => 'Lab U Price',
            'LabAbbr' => 'Lab Abbr',
            'LabSubName' => 'Lab Sub Name',
            'LabDescFlag' => 'Lab Desc Flag',
            'LabAddResultFlag' => 'Lab Add Result Flag',
        ];
    }
}
