|
|
|
@@ -1,3 +1,34 @@ |
|
|
|
# == Schema Information |
|
|
|
# |
|
|
|
# Table name: webhook |
|
|
|
# |
|
|
|
# id :integer not null, primary key |
|
|
|
# repo_id :integer |
|
|
|
# org_id :integer |
|
|
|
# url :text(65535) |
|
|
|
# signature :text(65535) |
|
|
|
# http_method :string(255) |
|
|
|
# content_type :integer |
|
|
|
# secret :text(65535) |
|
|
|
# events :text(65535) |
|
|
|
# is_ssl :boolean |
|
|
|
# is_active :boolean |
|
|
|
# hook_task_type :integer |
|
|
|
# meta :text(65535) |
|
|
|
# last_status :integer |
|
|
|
# created_unix :integer |
|
|
|
# updated_unix :integer |
|
|
|
# is_system_webhook :boolean default("0"), not null |
|
|
|
# |
|
|
|
# Indexes |
|
|
|
# |
|
|
|
# IDX_webhook_created_unix (created_unix) |
|
|
|
# IDX_webhook_is_active (is_active) |
|
|
|
# IDX_webhook_org_id (org_id) |
|
|
|
# IDX_webhook_repo_id (repo_id) |
|
|
|
# IDX_webhook_updated_unix (updated_unix) |
|
|
|
# |
|
|
|
|
|
|
|
class Gitea::Webhook < Gitea::Base |
|
|
|
serialize :events, JSON |
|
|
|
self.inheritance_column = nil |
|
|
|
@@ -10,4 +41,4 @@ class Gitea::Webhook < Gitea::Base |
|
|
|
enum hook_task_type: {gogs: 1, slack: 2, gitea: 3, discord: 4, dingtalk: 5, telegram: 6, msteams: 7, feishu: 8, matrix: 9} |
|
|
|
enum last_status: {waiting: 0, succeed: 1, fail: 2} |
|
|
|
enum content_type: {json: 1, form: 2} |
|
|
|
end |
|
|
|
end |