Your IP : 216.73.216.79


Current Path : /var/www/html/dyna-hr/models/
Upload File :
Current File : /var/www/html/dyna-hr/models/LeaveApplication.php

<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "leave_application".
 *
 * @property int $id
 * @property string $uuid
 * @property int $user_id
 * @property string $status
 * @property string $start_dt
 * @property string $end_dt
 * @property string $reason
 * @property string $attachment
 * @property string $total_days
 * @property string $leave_type
 * @property string $leave_length
 * @property int $created_by
 * @property string $created_dt
 * @property int $updated_by
 * @property string $updated_dt
 */
class LeaveApplication extends \yii\db\ActiveRecord {

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

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['start_dt', 'end_dt', 'reason', 'total_days', 'leave_type', 'leave_length'], 'required'],
            [['user_id', 'created_by', 'updated_by'], 'integer'],
            [['start_dt', 'end_dt', 'created_dt', 'updated_dt', 'uuid', 'approved_dt', 'approved_by'], 'safe'],
            [['reason'], 'string'],
            [['status', 'attachment', 'leave_type', 'leave_length'], 'string', 'max' => 255],
            [['total_days'], 'string', 'max' => 10],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'uuid' => 'Uuid',
            'user_id' => 'Staff Name',
            'status' => 'Status',
            'start_dt' => 'Start Date',
            'end_dt' => 'End Date',
            'reason' => 'Reason',
            'attachment' => 'Attachment',
            'total_days' => 'Total Days',
            'leave_type' => 'Leave Type',
            'leave_length' => 'Leave Length',
            'created_by' => 'Created By',
            'created_dt' => 'Apply Date',
            'updated_by' => 'Updated By',
            'updated_dt' => 'Updated Dt',
            'approved_dt' => 'Approved Date',
            'approved_by' => 'Approved By'
        ];
    }

}