You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: web_hook_system.go
    path of file: ./repos/erda/internal/tools/gittar/models
    
    the code of the file until where you have to start completion: // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Y
    
func (svc *Service) GetSystemHooksByEvent(event string, active bool) ([]WebHook, error) {
	var hooks []WebHook
	err := svc.db.Where("hook_type=? AND "+event+"=1 AND is_active=?",
		HOOK_TYPE_SYSTEM, active).Find(&hooks).Error

	if err != nil {
		return nil, err
	}
	return hooks, nil
}