* Wip * Wip * Wip: History * Wip: テストコード作成 * Fix test * Wip * Wip * Wip * Fix test * Wip * Wip * Wip * Wip * なんとか完成、これから動作確認 * spell miss * Change ng rule timings * Fix test * Wip * Fix test * Wip * Fix form * 表示まわりの改善
This commit is contained in:
parent
0779c748a6
commit
7d96d5828e
56 changed files with 2062 additions and 42 deletions
35
app/models/ng_rule_history.rb
Normal file
35
app/models/ng_rule_history.rb
Normal file
|
@ -0,0 +1,35 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: ng_rule_histories
|
||||
#
|
||||
# id :bigint(8) not null, primary key
|
||||
# ng_rule_id :bigint(8) not null
|
||||
# account_id :bigint(8)
|
||||
# text :string
|
||||
# uri :string
|
||||
# reason :integer not null
|
||||
# reason_action :integer not null
|
||||
# local :boolean default(TRUE), not null
|
||||
# hidden :boolean default(FALSE), not null
|
||||
# data :jsonb
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class NgRuleHistory < ApplicationRecord
|
||||
enum :reason, { account: 0, status: 1, reaction: 2 }, prefix: :reason
|
||||
enum :reason_action, {
|
||||
account_create: 0,
|
||||
status_create: 10,
|
||||
status_edit: 11,
|
||||
reaction_favourite: 20,
|
||||
reaction_emoji_reaction: 21,
|
||||
reaction_follow: 22,
|
||||
reaction_reblog: 23,
|
||||
reaction_vote: 24,
|
||||
}, prefix: :reason_action
|
||||
|
||||
belongs_to :ng_rule
|
||||
belongs_to :account
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue