2018-12-23 21:04:54 +01:00
|
|
|
# Pleroma: A lightweight social networking server
|
2018-12-31 16:41:47 +01:00
|
|
|
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
|
2018-12-23 21:04:54 +01:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2017-04-26 18:33:10 +02:00
|
|
|
defmodule Pleroma.Web.Websub.WebsubClientSubscription do
|
|
|
|
use Ecto.Schema
|
2017-04-27 09:44:20 +02:00
|
|
|
alias Pleroma.User
|
2017-04-26 18:33:10 +02:00
|
|
|
|
|
|
|
schema "websub_client_subscriptions" do
|
2018-03-30 15:01:53 +02:00
|
|
|
field(:topic, :string)
|
|
|
|
field(:secret, :string)
|
|
|
|
field(:valid_until, :naive_datetime)
|
|
|
|
field(:state, :string)
|
|
|
|
field(:subscribers, {:array, :string}, default: [])
|
|
|
|
field(:hub, :string)
|
2019-01-09 16:08:24 +01:00
|
|
|
belongs_to(:user, User, type: Pleroma.FlakeId)
|
2017-04-26 18:33:10 +02:00
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
end
|