Your IP : 216.73.216.79


Current Path : /var/www/html/school/backend/models/
Upload File :
Current File : /var/www/html/school/backend/models/AdmDaerah.php

<?php

namespace backend\models;

use Yii;

/**
 * masukkan bidang table db di dalam senarai ini
 * This is the model class for table "content_faq".
 *
 * @property int $id_daerah
 * @property string $kod_daerah
 * @property string $daerah
 * @property string $created_date
 * @property string $created_by
 * @property string $modified_by
 * @property string $modified_date
 * @property int $aktif 0-Tidak Aktif,1-Aktif
 * @property string $kod_negara
 * @property string $kod_negeri
 */

class AdmDaerah extends yii\db\ActiveRecord
{
    /**
     * Ubah tableName ke nama table dalam db
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'adm_daerah';
    }

    /**
     * Ubah atau tambah bidang db berdasarkan jenis data, jika perlu, letakkan property required.  jika date, time, letakkan di bawah safe
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['daerah', 'kod_daerah'], 'required'],
            [['id_daerah', 'aktif'], 'integer'],
            [['kod_daerah'], 'string','max' => 4],
            [['daerah'], 'string','max' => 40],
            [['created_by','modified_by'], 'string','max' => 50],
            [['kod_negara'], 'string','max' => 3],
            [['kod_negeri'], 'string','max' => 2],
            [['created_date', 'modified_date'], 'safe'],
        ];
    }

    /**
     * Ubah atau tambah label untuk setiap bidang.  Fungi Yii::t adalah untuk kegunaan fungsi terjemahan
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id_daerah' => Yii::t('app', 'ID'),
            'kod_daerah' => Yii::t('app', 'Kod Daerah'),
            'daerah' => Yii::t('app', 'Nama Daerah'),
            'kod_negara' => Yii::t('app', 'Kod Negara'),
            'kod_negeri' => Yii::t('app', 'Kod Negeri'),
            'aktif' => Yii::t('app', 'Aktif'),
            'created_date' => Yii::t('app', 'Created At'),
            'created_by' => Yii::t('app', 'Created By'),
            'modified_date' => Yii::t('app', 'Updated At'),
            'modified_by' => Yii::t('app', 'Updated By'),
        ];
    }
}