First pass at webmentions

This commit is contained in:
2023-07-04 22:57:33 +10:00
parent a2e7a51b5f
commit 6057a8b4f0
8 changed files with 108 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ module Adamantium
has_many :post_trips
has_many :trips, through: :post_trips
has_many :webmentions
end
end

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
module Adamantium
module Persistence
module Relations
class Webmentions < ROM::Relation[:sql]
schema :webmentions, infer: true do
associations do
belongs_to :post
end
end
auto_struct(true)
def published
where(self[:published_at] <= Time.now)
end
end
end
end
end