<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "record".
 *
 * @property string $todaydetail
 * @property string $st_classmark
 * @property string $startday
 * @property string $endday
 * @property integer $totalday
 * @property string $country
 * @property string $countryEN
 * @property string $st_name
 * @property string $st_nameEN
 * @property string $gaokaohao
 * @property string $idcard
 * @property string $sex
 * @property string $st_year
 * @property string $st_class
 * @property string $academy
 * @property string $major
 * @property string $status
 * @property string $model
 * @property string $today
 */
class Record extends \yii\db\ActiveRecord
{
    private static $_instance;

    public static function getinstance()
    {
        if(!(self::$_instance instanceof self))
        {
            self::$_instance =new self();
        }
        return self::$_instance;
    }    

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'record';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['todaydetail', 'st_classmark'], 'required'],
            [['idcard'],'string', 'length' =>18], 
            [['startday', 'endday'],'string', 'length' =>10],
            [['totalday'], 'integer'],
            [['todaydetail', 'model', 'today'], 'string', 'max' => 50],
            [['st_classmark','refusereason','reason', 'country', 'countryEN', 'st_name', 'st_nameEN', 'gaokaohao',  'st_year', 'st_class', 'academy', 'major'], 'string', 'max' => 100],
            [['sex', 'status'], 'string', 'max' => 20]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
        
           'todaydetail' => '时间编号',
           'today' => '申请时间(点击可排序)',
           'st_classmark' => '学号',
           'refusereason' => '拒绝理由(若批审核不通过时填写)',
           'reason' => '申请理由(必填  例具体缘由:医保证明)',
           'startday' => '出发日期',
           'endday' => '来校报到日期',
           'totalday' => '出国总天数',
           'country' => '目的国家（中文）',
           'countryEN' => '目的国家（英文）',
           'st_name' => '学生姓名',
           'st_nameEN' => '英文名（中文姓名拼音）',
           'gaokaohao' => '高考报名号(由学生处填写)',
           'idcard' => '身份证',
           'sex' => '性别(male/female)',
           'st_year' => '入学年份',
           'st_class' => '班级编号',
           'academy' => '学院',
           'major' => '专业',
           'status' => '状态(点击可排序)',
           'model' => '申请类型',
        ];
    }
}
