Skip to content

Instantly share code, notes, and snippets.

@dchw
Created February 3, 2023 15:55
Show Gist options
  • Save dchw/238904b34adc9459280c6ea2a4131d08 to your computer and use it in GitHub Desktop.
Save dchw/238904b34adc9459280c6ea2a4131d08 to your computer and use it in GitHub Desktop.
Billing Start DB
Table products {
name product
Indexes {
(name) [pk]
}
}
Table organizations {
id uuid
name text
Indexes {
(id) [pk]
}
}
Table seats {
org_id uuid
product text
count int
Indexes {
(org_id, product) [unique]
}
}
Ref: seats.org_id > organizations.id
Ref: seats.product > products.name
enum product {
satellites
ci
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment