68 lines
1.6 KiB
PHP
68 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
use yii\behaviors\TimestampBehavior;
|
|
use yii\db\ActiveRecord;
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
/**
|
|
* This is the model class for table "fingerprint".
|
|
*
|
|
* @property integer $id_fingerprint
|
|
* @property integer $id_customer
|
|
* @property string $fingerprint
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
*/
|
|
class Fingerprint extends ActiveRecord
|
|
{
|
|
public function behaviors()
|
|
{
|
|
return ArrayHelper::merge( [
|
|
[
|
|
'class' => TimestampBehavior::className(),
|
|
'value' => function(){ return date('Y-m-d H:i:s' ); },
|
|
'updatedAtAttribute' => false,
|
|
]
|
|
], parent::behaviors());
|
|
}
|
|
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'fingerprint';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['id_customer'], 'integer'],
|
|
[['fingerprint'], 'string'],
|
|
[['created_at', 'updated_at'], 'required'],
|
|
[['created_at', 'updated_at'], 'safe']
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id_fingerprint' => Yii::t('common/fingerprint', 'Id Fingerprint'),
|
|
'id_customer' => Yii::t('common/fingerprint', 'Id Customer'),
|
|
'fingerprint' => Yii::t('common/fingerprint', 'Fingerprint'),
|
|
'created_at' => Yii::t('common/fingerprint', 'Created At'),
|
|
'updated_at' => Yii::t('common/fingerprint', 'Updated At'),
|
|
];
|
|
}
|
|
}
|