Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace backend\modules\user\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "tbl_contact".
- *
- * @property integer $id
- * @property string $name
- * @property string $email
- * @property integer $created_at
- * @property integer $updated_at
- */
- class Contact extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'tbl_contact';//{{%contact}}
- }
- /**
- * {@inheritdoc}
- */
- public function behaviors()
- {
- return [
- TimestampBehavior::className(),
- ];
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['name', 'email'], 'required'],
- [['created_at', 'updated_at'], 'integer'],
- [['name', 'email'], 'string', 'max' => 50],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'name' => 'Name',
- 'email' => 'Email',
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement