forked from OpenUnited/platform
-
Notifications
You must be signed in to change notification settings - Fork 1
Commerce Context models
Adrian McPhee edited this page Oct 19, 2024
·
7 revisions
classDiagram
%% Commerce models
class Organisation {
+name: CharField
+country: CharField
+tax_id: CharField
}
class OrganisationWallet
class OrganisationWalletTransaction
class OrganisationPointAccount
class ProductPointAccount
class PointTransaction
class OrganisationPointGrant
class OrganisationPointGrantRequest
class ProductPointRequest
class Cart
class CartLineItem
class SalesOrder
class SalesOrderLineItem
class PointOrder
class ContributorWallet
class ContributorPointAccount
class ContributorWalletTransaction
class ContributorPointTransaction
class PlatformFeeConfiguration
%% External models (simplified)
class Person {
<<external>>
+full_name: CharField
}
class Bounty {
<<external>>
+title: CharField
}
class BountyBid {
<<external>>
+amount: DecimalField
}
class Product {
<<external>>
+name: CharField
}
%% Relationships within commerce models
Organisation "1" -- "1" OrganisationWallet
Organisation "1" -- "1" OrganisationPointAccount
Organisation "1" -- "*" OrganisationPointGrant
Organisation "1" -- "*" OrganisationPointGrantRequest
OrganisationWallet "1" -- "*" OrganisationWalletTransaction
OrganisationPointAccount "1" -- "*" PointTransaction
ProductPointAccount "1" -- "*" PointTransaction
Cart "1" -- "*" CartLineItem
Cart "1" -- "1" SalesOrder
Cart "1" -- "1" PointOrder
SalesOrder "1" -- "*" SalesOrderLineItem
PointOrder "1" -- "0..1" PointOrder : parent_order
ContributorWallet "1" -- "*" ContributorWalletTransaction
ContributorPointAccount "1" -- "*" ContributorPointTransaction
%% Relationships with models outside commerce
Organisation "0..1" -- "*" Cart
Cart "0..1" -- "1" Person
CartLineItem "*" -- "0..1" Bounty
CartLineItem "*" -- "0..1" BountyBid
SalesOrderLineItem "*" -- "0..1" Bounty
SalesOrderLineItem "*" -- "0..1" BountyBid
ProductPointAccount "1" -- "1" Product
ProductPointRequest "*" -- "1" Product
ContributorWallet "1" -- "1" Person
ContributorPointAccount "1" -- "1" Person
OrganisationPointGrant "*" -- "1" Person : granted_by
OrganisationPointGrantRequest "*" -- "1" Person : requested_by
ProductPointRequest "*" -- "1" Person : requested_by