Skip to content

Defenitions

Lars Westermann edited this page Jan 30, 2020 · 2 revisions
  • Attributes that end with a question mark ? (eg. mail?) are nullable.
  • All money related values are in cents.

Permission

["DEFAULT", "MEMBER", "ADMIN"]

Account

{
    "id": "00000000-0000-0000-0000-000000000000",
    "credit": 420,
    "minimum_credit": -1000,
    "name": "full name",
    "mail": "[email protected]",
    "username": "john",
    "account_number": "0000 0000 0000 0000",
    "permission": <<Permission>>
}

Price

{
    "validity_start": 1970-01-01,
    "value": 420
}

Category

{
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "category name",
    "prices": [
        <<Price>>
    ],
    "current_price?": 420
}

Product

{
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "prodcut name",
    "category?": <<Category>>,
    "image?": "/url/to/image.jpg",
    "prices": [
        <<Price>>
    ],
    "current_price?": 420,
    "barcode?": "0000000"
}

Transaction

{
    "id": "00000000-0000-0000-0000-000000000000",
    "account_id": "00000000-0000-0000-0000-000000000000",
    "cashier_id?": "00000000-0000-0000-0000-000000000000",
    "total": 420,
    "date": "2020-31-01T13:37:00"
}
Clone this wiki locally