Files
xk-api-yii/common/models/ChargeCashPayRecord.php

30 lines
660 B
PHP

<?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
class ChargeCashPayRecord extends \common\modelsgii\ChargeCashPayRecord
{
public function behaviors()
{
return [
[
'class' => TimestampBehavior::class,
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at','updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
],
];
}
//门店
public function getStore()
{
return $this->hasOne(Store::class, ['id'=>'store_id']);
}
}