<?php

namespace app\models;

use Yii;
use yii\helpers\Html;
use app\base\Converter;
use rmrevin\yii\fontawesome\FA;
use yii\behaviors\TimestampBehavior;


/**
 * This is the model class for table "v_visitstatus".
 *
 * @property string $pid
 * @property integer $demographics_pid
 * @property integer $quality_of_life_pid
 * @property integer $hiv_continuum_pid
 * @property integer $pre_art_beliefs_pid
 * @property integer $post_art_beliefs_pid
 * @property integer $substance_use_pid
 * @property integer $risk_behavior_pid
 * @property integer $depression_pid
 * @property integer $health_care_utilization_pid
 * @property integer $hiv_visit_pid
 * @property integer $cd4_test_pid
 */
class Repperiodost extends \yii\db\ActiveRecord
{
	/**
	 * @inheritdoc
	 */
    public static function tableName()
	{
		return '{{%ostrepdateperiod}}';
	}

	/**
	 * @inheritdoc
	 */
	public function behaviors()
	{
		return [
			[
				'class' => TimestampBehavior::className(),
				'createdAtAttribute' => 'create_time',
				'updatedAtAttribute' => 'update_time',
				'value' => date('U'),
			]
		];
	}

	/**
	 * @inheritdoc
	 */
	public function rules()
	{
		return [
			[['period'], 'required'],         
			[['period','create_time','update_time'], 'integer'],	
            [['record_date'], 'default', 'value' => strtotime(date('Y/m/d'))],			
			
		];
	}

	/**
	 * @inheritdoc
	 */
	public function attributeLabels()
	{
		return [
			'period' => Yii::t('app', 'Period'),
		];
	}
	
	 
    
}
