新增:帖子删除枚举值

This commit is contained in:
yystopf 2026-03-25 14:06:58 +08:00
parent c53decf753
commit 84bd1d6fae
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class Memo < ApplicationRecord
belongs_to :author, :class_name => "User", foreign_key: :author_id, counter_cache: true
enum destroy_status: {common: 0, apply_destroy: 1}
def meno_tag_name
tag_id.to_i > 3 ? "" : ["", "交流", "求助", "新闻"][tag_id.to_i]
end