# == Schema Information
#
# Table name: hook_task
#
#  id               :integer          not null, primary key
#  hook_id          :integer
#  uuid             :string(255)
#  payload_content  :text(4294967295)
#  event_type       :string(255)
#  is_delivered     :boolean
#  delivered        :integer
#  is_succeed       :boolean
#  request_content  :text(4294967295)
#  response_content :text(4294967295)
#

class Gitea::WebhookTask < Gitea::Base
  serialize :payload_content, JSON
  serialize :request_content, JSON
  serialize :response_content, JSON

  self.inheritance_column = nil

  self.table_name = 'hook_task'

  belongs_to :webhook, class_name: "Gitea::Webhook", foreign_key: :hook_id

  enum type: {gogs: 1, slack: 2, gitea: 3, discord: 4, dingtalk: 5, telegram: 6, msteams: 7, feishu: 8, matrix: 9}

end
