# == 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::CreateOrAssign < TemplateMessageSetting 

  def self.type_name 
    "我创建的或负责的"
  end

  def self.order_index
    20
  end

  def self.build_init_data
    self.find_or_create_by(name: "疑修状态变更", key: "IssueChanged")
    self.find_or_create_by(name: "合并请求状态变更", key: "PullRequestChanged")
    self.find_or_create_by(name: "疑修截止日期到达最后一天", key: "IssueExpire", notification_disabled: false)
    self.find_or_create_by(name: "里程碑逾期提醒", key: "MilestoneExpired", notification_disabled: false, email_disabled: true)
  end
end
