Merge remote-tracking branch 'origin/develop' into benchmark-finishing
[akkoma] / lib / pleroma / web / websub / websub_client_subscription.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Websub.WebsubClientSubscription do
6 use Ecto.Schema
7 alias Pleroma.User
8
9 schema "websub_client_subscriptions" do
10 field(:topic, :string)
11 field(:secret, :string)
12 field(:valid_until, :naive_datetime_usec)
13 field(:state, :string)
14 field(:subscribers, {:array, :string}, default: [])
15 field(:hub, :string)
16 belongs_to(:user, User, type: FlakeId.Ecto.CompatType)
17
18 timestamps()
19 end
20 end