Skip to content

Commit 80790f2

Browse files
feat(#2576): Models for the Offering project
1 parent 76dbe7a commit 80790f2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/design/database_models.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,21 @@ Simple model, represents person role within a membership (see
268268
Similar to [`Task`](#task) model, but it's for a person task within a membership. Links
269269
to `MembershipPersonRole`.
270270

271+
### `Consortium`
272+
Represents a consortium of multiple organisations. A consortium can be the partner in a
273+
[`Partnership`](#partnership).
274+
275+
### `PartnershipTier`
276+
Represents a tier level for a partnership (e.g. "Bronze", "Silver", "Gold"), with an
277+
associated credit count.
278+
279+
### `Partnership`
280+
Represents a service partnership between The Carpentries and an organisation or
281+
consortium. A follow-up to the [`Membership`](#membership) model, introduced as part of
282+
the [Service Offering 2025 project](./projects/2025_service_offering.md).
283+
284+
Includes a `registration_code` field — a unique code used to identify the partnership in trainee applications or workshop requests (see also [Member Code Enforcement](./projects/2023_member_code_enforcement.md)).
285+
271286
----------------------------------------------------------------------------------------
272287

273288
## External requests application - `extrequests/models.py`
@@ -387,3 +402,31 @@ be sent by the email worker.
387402
### `ScheduledEmailLog`
388403
Represents a log entry for a scheduled email. This is used to track the status changes
389404
of an email.
405+
406+
----------------------------------------------------------------------------------------
407+
408+
## Offering application - `offering/models.py`
409+
410+
The offering application models support the [Service Offering 2025](./projects/2025_service_offering.md) project. They represent
411+
the purchasing and allocation of benefits to partner organisations and individuals.
412+
413+
### `Account`
414+
Represents the individual or organisation that purchases benefits. An `Account` is linked
415+
to a `Person`, `Organization`, or `Consortium` via a generic foreign key.
416+
417+
### `AccountOwner`
418+
Represents a person appointed as the owner of an account. Stores the permission type
419+
(owner, programmatic contact, or billing contact).
420+
421+
### `Benefit`
422+
Represents a single good available to be purchased for an account (e.g. training seats
423+
or workshop events). Stores a unit type and credit count.
424+
425+
### `AccountBenefitDiscount`
426+
Simple model representing a discount that can be applied to an account benefit purchase. The discount is just a text, no logic is applied to it in AMY, but it can be used for reporting and tracking purposes.
427+
428+
### `AccountBenefit`
429+
Represents a single benefit purchased for an account. Links an [`Account`](#account) to
430+
a [`Benefit`](#benefit), optionally via a [`Partnership`](#partnership). Stores
431+
allocation, date range, and a unique `registration_code` used to identify the benefit in
432+
training requests and workshop requests (see [Member Code Enforcement](./projects/2023_member_code_enforcement.md)).

0 commit comments

Comments
 (0)