# == Schema Information # # Table name: message_templates # # id :integer not null, primary key # type :string(255) # sys_notice :text(65535) # email :text(65535) # created_at :datetime not null # updated_at :datetime not null # notification_url :string(255) # email_title :string(255) # # 报名的竞赛进入比赛进行阶段 # 触发场景 # 赛队成员报名的竞赛已进入比赛进行阶段 # 通知文案格式 # 你报名的竞赛 xxx 已进入比赛进行阶段,可在此阶段提交作品 # 时间:x分钟/小时/天/月前 # 通知文案示例 # 你报名的竞赛 代码审查大赛 已进入比赛进行阶段,可在此期间提交作品 # 时间:3小时前 # 点击通知跳转页面 # 点击此通知将跳转到代码审查大赛详情页: # http://117.50.100.12:8080/competitions/lgw7st/home class MessageTemplate::CompetitionBegin < MessageTemplate # MessageTemplate::FollowedTip.get_message_content(User.where(login: 'yystopf'), User.last) def self.get_message_content(receivers, competition) return receivers_string(receivers), sys_notice.to_s.gsub('{competition_name}', competition&.name), notification_url.to_s.gsub('{to_url}', "/competitions/#{competition.identifier}/home") # rescue # return '', '', '' end end