Your IP : 216.73.216.79


Current Path : /var/www/html/school/backend/models/
Upload File :
Current File : /var/www/html/school/backend/models/AdmDaerahKecil.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_kecil
 * @property string $kod_daerah_kecil
 * @property string $daerah_kecil
 * @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
 * @property string $kod_daerah
 */

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

    /**
     * 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_kecil', 'kod_daerah_kecil'], 'required'],
            [['id_daerah_kecil', 'aktif'], 'integer'],
            [['kod_daerah_kecil'], 'string','max' => 6],
            [['daerah_kecil'], 'string','max' => 40],
            [['created_by','modified_by'], 'string','max' => 50],
            [['kod_negara'], 'string','max' => 3],
            [['kod_negeri'], 'string','max' => 2],
            [['kod_daerah'], 'string','max' => 4],
            [['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_kecil' => Yii::t('app', 'ID'),
            'kod_daerah_kecil' => Yii::t('app', 'Kod Daerah Kecil'),
            'daerah_kecil' => Yii::t('app', 'Nama Daerah Kecil'),
            'kod_negara' => Yii::t('app', 'Kod Negara'),
            'kod_negeri' => Yii::t('app', 'Kod Negeri'),
            'kod_daerah' => Yii::t('app', 'Kod Daerah'),
            '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'),
        ];
    }
}