<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "RiaLabD".
 *
 * @property string $RiaHDocDate
 * @property string $RiaHDocID
 * @property int $RiaLDSeq
 * @property int|null $RiaDSeq
 * @property int $LabSetFlag
 * @property string|null $LabID
 * @property string|null $LabName
 * @property string|null $SpecID
 * @property string|null $SpecName
 * @property string|null $SpecGrpName
 * @property string|null $LabID_Set
 * @property string|null $LabName_Set
 * @property string|null $SpecID_Set
 * @property string|null $SpecName_Set
 * @property string|null $SpecGrpName_Set
 * @property string|null $LabTID
 * @property string|null $LabTName
 * @property string|null $LabGrpID
 * @property string|null $LabGrpName
 * @property string|null $LabSubID
 * @property string|null $LabSubName
 * @property string|null $MetAbbr
 * @property string|null $LabUnit
 * @property string|null $LabNormal1
 * @property string|null $LabNormal2
 * @property float|null $RiaDUPrice
 * @property float|null $RiaDUPrice_Set
 * @property int|null $RiaDTubNbr
 * @property int|null $RiaDInOut
 * @property string|null $RiaLDRsltAnal
 * @property int $RiaLDSelectFlag
 * @property int $RiaLDGetRiaFrmDFlag
 * @property int $RiaLDTestFlag
 * @property string|null $RiaLDUserIDEntry
 * @property string|null $RiaLDUserDateEntry
 * @property string|null $RiaLDUserNameEntry
 * @property int $RiaLDReEntryFlag
 * @property string|null $RiaLDUserIDReEntry
 * @property string|null $RiaLDUserNameReEntry
 * @property string|null $RiaLDUserDateReEntry
 * @property int $RiaLDApprvFlag
 * @property string|null $RiaLDUserIDAppr
 * @property string|null $RiaLDUserNameAppr
 * @property string|null $RiaLDUserDateAppr
 * @property string|null $RiaLHFinDocID
 * @property int $LabResultFlag
 * @property int $LabSecretFlag
 * @property string|null $LabResultSts
 * @property int $CustLabSpPriceFlag
 * @property float|null $LabUprice
 * @property string|null $LabAbbr
 * @property string|null $LabAbbr_Set
 * @property int $LabDescFlag
 * @property int $LabAddResultFlag
 * @property int $RiaLDRsltSecretFlag
 * @property string|null $RiaLDRsltPre1Exp
 * @property int|null $RiaLDRslt1Exp
 * @property string|null $RiaLDRsltPre2Exp
 * @property int|null $RiaLDRslt2Exp
 * @property int|null $RiaHOnlineFlag
 * @property string $RiaLDGenFileFlag
 * @property string|null $RiaLDGenFileDate
 * @property string|null $MLABLabNo
 * @property string|null $VSLabSend
 * @property string|null $MessageCode
 * @property string|null $LabComment
 */
class RiaLabD extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'RiaLabD';
    }

    /**
     * @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', 'RiaLDSeq', 'LabSetFlag', 'RiaLDSelectFlag', 'RiaLDGetRiaFrmDFlag', 'RiaLDTestFlag', 'RiaLDReEntryFlag', 'RiaLDApprvFlag', 'LabResultFlag', 'LabSecretFlag', 'CustLabSpPriceFlag', 'LabDescFlag', 'LabAddResultFlag', 'RiaLDRsltSecretFlag', 'RiaLDGenFileFlag'], 'required'],
            [['RiaHDocDate', 'RiaLDUserDateEntry', 'RiaLDUserDateReEntry', 'RiaLDUserDateAppr', 'RiaLDGenFileDate'], 'safe'],
            [['RiaLDSeq', 'RiaDSeq', 'LabSetFlag', 'RiaDTubNbr', 'RiaDInOut', 'RiaLDSelectFlag', 'RiaLDGetRiaFrmDFlag', 'RiaLDTestFlag', 'RiaLDReEntryFlag', 'RiaLDApprvFlag', 'LabResultFlag', 'LabSecretFlag', 'CustLabSpPriceFlag', 'LabDescFlag', 'LabAddResultFlag', 'RiaLDRsltSecretFlag', 'RiaLDRslt1Exp', 'RiaLDRslt2Exp', 'RiaHOnlineFlag'], 'integer'],
            [['RiaDUPrice', 'RiaDUPrice_Set', 'LabUprice'], 'number'],
            [['RiaHDocID', 'LabID', 'LabID_Set', 'MetAbbr', 'RiaLDUserIDEntry', 'RiaLDUserIDReEntry', 'RiaLDUserIDAppr', 'RiaLHFinDocID', 'LabAbbr', 'LabAbbr_Set', 'MLABLabNo', 'MessageCode'], 'string', 'max' => 20],
            [['LabName', 'SpecName', 'SpecGrpName', 'LabName_Set', 'SpecName_Set', 'SpecGrpName_Set', 'LabTName', 'LabGrpName', 'LabSubName', 'RiaLDRsltPre1Exp', 'RiaLDRsltPre2Exp'], 'string', 'max' => 100],
            [['SpecID', 'SpecID_Set', 'LabSubID'], 'string', 'max' => 4],
            [['LabTID', 'LabGrpID'], 'string', 'max' => 2],
            [['LabUnit', 'RiaLDUserNameEntry', 'RiaLDUserNameReEntry', 'RiaLDUserNameAppr'], 'string', 'max' => 50],
            [['LabNormal1', 'LabNormal2'], 'string', 'max' => 150],
            [['RiaLDRsltAnal', 'LabComment'], 'string', 'max' => 255],
            [['LabResultSts', 'RiaLDGenFileFlag', 'VSLabSend'], 'string', 'max' => 1],
            [['RiaHDocDate', 'RiaHDocID', 'RiaLDSeq'], 'unique', 'targetAttribute' => ['RiaHDocDate', 'RiaHDocID', 'RiaLDSeq']],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'RiaHDocDate' => 'Ria H Doc Date',
            'RiaHDocID' => 'Ria H Doc ID',
            'RiaLDSeq' => 'Ria Ld Seq',
            'RiaDSeq' => 'Ria D Seq',
            'LabSetFlag' => 'Lab Set Flag',
            'LabID' => 'Lab ID',
            'LabName' => 'Lab Name',
            'SpecID' => 'Spec ID',
            'SpecName' => 'Spec Name',
            'SpecGrpName' => 'Spec Grp Name',
            'LabID_Set' => 'Lab Id Set',
            'LabName_Set' => 'Lab Name Set',
            'SpecID_Set' => 'Spec Id Set',
            'SpecName_Set' => 'Spec Name Set',
            'SpecGrpName_Set' => 'Spec Grp Name Set',
            'LabTID' => 'Lab Tid',
            'LabTName' => 'Lab T Name',
            'LabGrpID' => 'Lab Grp ID',
            'LabGrpName' => 'Lab Grp Name',
            'LabSubID' => 'Lab Sub ID',
            'LabSubName' => 'Lab Sub Name',
            'MetAbbr' => 'Met Abbr',
            'LabUnit' => 'Lab Unit',
            'LabNormal1' => 'Lab Normal1',
            'LabNormal2' => 'Lab Normal2',
            'RiaDUPrice' => 'Ria Du Price',
            'RiaDUPrice_Set' => 'Ria Du Price Set',
            'RiaDTubNbr' => 'Ria D Tub Nbr',
            'RiaDInOut' => 'Ria D In Out',
            'RiaLDRsltAnal' => 'Ria Ld Rslt Anal',
            'RiaLDSelectFlag' => 'Ria Ld Select Flag',
            'RiaLDGetRiaFrmDFlag' => 'Ria Ld Get Ria Frm D Flag',
            'RiaLDTestFlag' => 'Ria Ld Test Flag',
            'RiaLDUserIDEntry' => 'Ria Ld User Id Entry',
            'RiaLDUserDateEntry' => 'Ria Ld User Date Entry',
            'RiaLDUserNameEntry' => 'Ria Ld User Name Entry',
            'RiaLDReEntryFlag' => 'Ria Ld Re Entry Flag',
            'RiaLDUserIDReEntry' => 'Ria Ld User Id Re Entry',
            'RiaLDUserNameReEntry' => 'Ria Ld User Name Re Entry',
            'RiaLDUserDateReEntry' => 'Ria Ld User Date Re Entry',
            'RiaLDApprvFlag' => 'Ria Ld Apprv Flag',
            'RiaLDUserIDAppr' => 'Ria Ld User Id Appr',
            'RiaLDUserNameAppr' => 'Ria Ld User Name Appr',
            'RiaLDUserDateAppr' => 'Ria Ld User Date Appr',
            'RiaLHFinDocID' => 'Ria Lh Fin Doc ID',
            'LabResultFlag' => 'Lab Result Flag',
            'LabSecretFlag' => 'Lab Secret Flag',
            'LabResultSts' => 'Lab Result Sts',
            'CustLabSpPriceFlag' => 'Cust Lab Sp Price Flag',
            'LabUprice' => 'Lab Uprice',
            'LabAbbr' => 'Lab Abbr',
            'LabAbbr_Set' => 'Lab Abbr Set',
            'LabDescFlag' => 'Lab Desc Flag',
            'LabAddResultFlag' => 'Lab Add Result Flag',
            'RiaLDRsltSecretFlag' => 'Ria Ld Rslt Secret Flag',
            'RiaLDRsltPre1Exp' => 'Ria Ld Rslt Pre1exp',
            'RiaLDRslt1Exp' => 'Ria Ld Rslt1exp',
            'RiaLDRsltPre2Exp' => 'Ria Ld Rslt Pre2exp',
            'RiaLDRslt2Exp' => 'Ria Ld Rslt2exp',
            'RiaHOnlineFlag' => 'Ria H Online Flag',
            'RiaLDGenFileFlag' => 'Ria Ld Gen File Flag',
            'RiaLDGenFileDate' => 'Ria Ld Gen File Date',
            'MLABLabNo' => 'Mlab Lab No',
            'VSLabSend' => 'Vs Lab Send',
            'MessageCode' => 'Message Code',
            'LabComment' => 'Lab Comment',
        ];
    }
}