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