TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['store_id', 'q_integral', 'rule', 'key', 'appid'], 'required'], [['store_id', 'q_integral', 'updated_at'], 'safe'] ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'q_integral' => '问题消耗积分', 'rule' => '规则说明', 'updated_at' => 'Update Time', 'key' => 'key', 'appid' => 'appid', ]; } }