2021-10-13 17:04:28 +08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: template_message_settings
|
|
|
|
|
#
|
|
|
|
|
# id :integer not null, primary key
|
|
|
|
|
# type :string(255)
|
|
|
|
|
# name :string(255)
|
|
|
|
|
# key :string(255)
|
2023-08-15 00:15:10 +08:00
|
|
|
# openning :boolean default("1")
|
|
|
|
|
# notification_disabled :boolean default("1")
|
|
|
|
|
# email_disabled :boolean default("0")
|
2021-10-13 17:04:28 +08:00
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
class TemplateMessageSetting < ApplicationRecord
|
|
|
|
|
|
2021-10-14 14:12:50 +08:00
|
|
|
scope :openning, ->() {where(openning: true)}
|
|
|
|
|
|
|
|
|
|
def self.type_name
|
|
|
|
|
""
|
|
|
|
|
end
|
|
|
|
|
|
2021-10-13 17:04:28 +08:00
|
|
|
def self.build_init_data
|
2021-10-14 14:12:50 +08:00
|
|
|
TemplateMessageSetting::CreateOrAssign.build_init_data
|
|
|
|
|
TemplateMessageSetting::ManageProject.build_init_data
|
|
|
|
|
TemplateMessageSetting::Normal.build_init_data
|
|
|
|
|
TemplateMessageSetting::WatchProject.build_init_data
|
2021-10-13 17:04:28 +08:00
|
|
|
end
|
|
|
|
|
end
|