Skip to content

Commit

Permalink
Teams setup schema (#4944)
Browse files Browse the repository at this point in the history
* Add team-setup related flags to Team schema

* Diverge from schema-defaults in test factories
  • Loading branch information
aerosol authored Jan 7, 2025
1 parent 4eef88d commit 5f1de88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/plausible/teams/team.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ defmodule Plausible.Teams.Team do
field :accept_traffic_until, :date
field :allow_next_upgrade_override, :boolean, default: false

field :setup_complete, :boolean, default: false
field :setup_at, :naive_datetime

embeds_one :grace_period, Plausible.Auth.GracePeriod, on_replace: :update

has_many :sites, Plausible.Site
Expand Down
4 changes: 3 additions & 1 deletion test/support/factory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ defmodule Plausible.Factory do
def team_factory do
%Plausible.Teams.Team{
name: "My Team",
trial_expiry_date: Timex.today() |> Timex.shift(days: 30)
trial_expiry_date: Timex.today() |> Timex.shift(days: 30),
setup_complete: true,
setup_at: NaiveDateTime.utc_now()
}
end

Expand Down

0 comments on commit 5f1de88

Please sign in to comment.