websub_client_subscription.ex 558 Bytes
Newer Older
1
2
3
4
# Pleroma: A lightweight social networking server
# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

5
6
defmodule Pleroma.Web.Websub.WebsubClientSubscription do
  use Ecto.Schema
7
  alias Pleroma.User
8
9

  schema "websub_client_subscriptions" do
lain's avatar
lain committed
10
11
12
13
14
15
16
    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)
17
18
19
20

    timestamps()
  end
end