255], ['type', 'default', 'value'=>0] ]; } public function behaviors() { return [ [ 'class' => TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'qrcode_bg' => '背景图片', 'avatar_size' => '头像大小{\"w\":\"\",\"h\":\"\"}', 'avatar_position' => '头像坐标{\"x\":\"\",\"y\":\"\"}', 'qrcode_size' => '二维码大小{\"w\":\"\",\"h\":\"\"}', 'qrcode_position' => '二维码坐标{\"x\":\"\",\"y\":\"\"}', 'font_position' => '字体坐标{\"x\":\"\",\"y\":\"\"}', 'font' => '字体设置 { \"size\":大小, \"color\":\"r,g,b\" }', 'preview'=>'预览图', 'is_delete' => 'Is Delete', 'created_at' => 'add time', 'updated_at' => 'modify time', 'type' => '海报类型' ]; } public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub if (!$insert) { if ($this->type === Qrcode::TYPE_SHARE) { (new DiyCommon)->JobBehaviors($this->store_id, StoreSyncExtLog::TYPE_SHARE_CONFIG, ['share_qrcode']); } } } }