# == Schema Information
#
# Table name: template_message_settings
#
#  id                    :integer          not null, primary key
#  type                  :string(255)
#  name                  :string(255)
#  key                   :string(255)
#  openning              :boolean          default("1")
#  notification_disabled :boolean          default("1")
#  email_disabled        :boolean          default("0")
#  created_at            :datetime         not null
#  updated_at            :datetime         not null
#

#我管理的
class TemplateMessageSetting::ManageProject < TemplateMessageSetting 

  def self.type_name 
    "我管理的仓库"
  end

  def self.order_index 
    30
  end

  def self.build_init_data
    self.find_or_create_by(name: "有新的疑修", key: "Issue")
    self.find_or_create_by(name: "有新的合并请求", key: "PullRequest")
    self.find_or_create_by(name: "有成员变动", key: "Member")
    self.find_or_create_by(name: "仓库设置被更改", key: "SettingChanged")
    self.find_or_create_by(name: "被点赞", key: "Praised", notification_disabled: false, email_disabled: true)
    self.find_or_create_by(name: "被fork", key: "Forked", notification_disabled: false, email_disabled: true)
    self.find_or_create_by(name: "有新的里程碑", key: "Milestone", notification_disabled: false)
    self.find_or_create_by(name: "有里程碑已完成", key: "MilestoneCompleted", notification_disabled: false)
  end
end
