Introduce operator enrollment partials and handlers that route plan-tier granting and revocation through entitlements.Transition(). Add member-facing tier labels, plan architecture and grant-plan-safety documentation, plus unit and e2e tests. Also add small querier helpers and wire Temporal client hooks for trial expiration scheduling.
23 lines
561 B
SQL
23 lines
561 B
SQL
-- name: CreatePerson :one
|
|
INSERT INTO identity.persons (user_id, display_name, primary_email, primary_email_verified)
|
|
VALUES ($1, $2, $3, $4)
|
|
RETURNING *;
|
|
|
|
-- name: GetPersonByUserID :one
|
|
SELECT * FROM identity.persons
|
|
WHERE user_id = $1;
|
|
|
|
-- name: GetPersonByID :one
|
|
SELECT * FROM identity.persons
|
|
WHERE person_id = $1;
|
|
|
|
-- name: UpdatePerson :one
|
|
UPDATE identity.persons
|
|
SET display_name = $1, primary_email = $2, primary_email_verified = $3
|
|
WHERE person_id = $4
|
|
RETURNING *;
|
|
|
|
-- name: ListPersons :many
|
|
SELECT * FROM identity.persons
|
|
ORDER BY display_name;
|