| Current Path : /var/www/html/mtdc/backend/models/ |
| Current File : /var/www/html/mtdc/backend/models/AdmGelaran.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_gelaran
* @property string $kod_gelaran
* @property string $gelaran
* @property string $created_date
* @property string $created_by
* @property string $modified_by
* @property string $modified_date
* @property int $aktif 0-Tidak Aktif,1-Aktif
*/
class AdmGelaran extends yii\db\ActiveRecord
{
/**
* Ubah tableName ke nama table dalam db
* @inheritdoc
*/
public static function tableName()
{
return 'adm_gelaran';
}
/**
* 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 [
[['gelaran', 'kod_gelaran'], 'required'],
[['id_gelaran', 'aktif'], 'integer'],
[['kod_gelaran'], 'string','max' => 2],
[['gelaran'], 'string','max' => 50],
[['created_by','modified_by'], 'string','max' => 50],
[['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_gelaran' => Yii::t('app', 'ID'),
'kod_gelaran' => Yii::t('app', 'Kod Gelaran'),
'gelaran' => Yii::t('app', 'Nama Gelaran'),
'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'),
];
}
}