<?php

namespace myresto\models;

use Yii;

/**
 * This is the model class for table "solis_payment_type".
 *
 * @property int $fpkey
 * @property string $fcode
 * @property string $fname
 * @property int $fstatus
 * @property int $fdeleted
 * @property int $finternal
 * @property int $fshowdetail
 * @property int $fmasknumlastdigit
 * @property string $flastupdated
 * @property string $fgcode
 * @property int $fstorekey
 * @property int $feditable
 * @property int $ftype
 * @property int $fsort
 * @property double $fmerchantfee
 * @property int $fstyle 0:show info(detail payment) | 1: tidak show
 */
class SolisPaymentType extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'solis_payment_type';
    }

    public static function getDb() {
        return Yii::$app->dbMyResto;
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['fpkey'], 'required'],
            [['fpkey', 'fstatus', 'fdeleted', 'finternal', 'fshowdetail', 'fmasknumlastdigit', 'fstorekey', 'feditable', 'ftype', 'fsort', 'fstyle'], 'integer'],
            [['flastupdated'], 'safe'],
            [['fmerchantfee'], 'number'],
            [['fcode'], 'string', 'max' => 20],
            [['fname'], 'string', 'max' => 30],
            [['fgcode'], 'string', 'max' => 25],
            [['fpkey'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'fpkey' => 'Fpkey',
            'fcode' => 'Fcode',
            'fname' => 'Fname',
            'fstatus' => 'Fstatus',
            'fdeleted' => 'Fdeleted',
            'finternal' => 'Finternal',
            'fshowdetail' => 'Fshowdetail',
            'fmasknumlastdigit' => 'Fmasknumlastdigit',
            'flastupdated' => 'Flastupdated',
            'fgcode' => 'Fgcode',
            'fstorekey' => 'Fstorekey',
            'feditable' => 'Feditable',
            'ftype' => 'Ftype',
            'fsort' => 'Fsort',
            'fmerchantfee' => 'Fmerchantfee',
            'fstyle' => 'Fstyle',
        ];
    }
}
