2017-04-26 16:33:10 +00:00
|
|
|
defmodule Pleroma.Web.Websub.WebsubClientSubscription do
|
|
|
|
use Ecto.Schema
|
2017-04-27 07:44:20 +00:00
|
|
|
alias Pleroma.User
|
2017-04-26 16:33:10 +00:00
|
|
|
|
|
|
|
schema "websub_client_subscriptions" do
|
2018-03-30 13:01:53 +00:00
|
|
|
field(:topic, :string)
|
|
|
|
field(:secret, :string)
|
|
|
|
field(:valid_until, :naive_datetime)
|
|
|
|
field(:state, :string)
|
|
|
|
field(:subscribers, {:array, :string}, default: [])
|
|
|
|
field(:hub, :string)
|
|
|
|
belongs_to(:user, User)
|
2017-04-26 16:33:10 +00:00
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
end
|