diff options
Diffstat (limited to 'app/models/conversation.rb')
-rw-r--r-- | app/models/conversation.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/models/conversation.rb b/app/models/conversation.rb new file mode 100644 index 000000000..fbec961c7 --- /dev/null +++ b/app/models/conversation.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# == Schema Information +# +# Table name: conversations +# +# id :integer not null, primary key +# uri :string +# created_at :datetime not null +# updated_at :datetime not null +# + +class Conversation < ApplicationRecord + validates :uri, uniqueness: true + + has_many :statuses + + def local? + uri.nil? + end +end |