nas/app/models/list_status.rb
KMY(雪あすか) f8280ca5d9
Add: #95 リストへの新着投稿通知 (#192)
* Add: テーブル定義、内部処理

* Add: 通知の定期削除処理、自動削除、テスト

* Add: Web画面の表示、設定

* Fix test
2023-10-31 08:59:31 +09:00

21 lines
501 B
Ruby

# frozen_string_literal: true
# == Schema Information
#
# Table name: list_statuses
#
# id :bigint(8) not null, primary key
# list_id :bigint(8) not null
# status_id :bigint(8) not null
# created_at :datetime not null
# updated_at :datetime not null
#
class ListStatus < ApplicationRecord
belongs_to :list
belongs_to :status
has_one :notification, as: :activity, dependent: :destroy
validates :status, uniqueness: { scope: :list }
end