Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
b2512891
Commit
b2512891
authored
Nov 16, 2011
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First documentation about the TIO format.
parent
9577bd2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
358 additions
and
0 deletions
+358
-0
documentation/source/index.rst
documentation/source/index.rst
+1
-0
documentation/source/tioformat.rst
documentation/source/tioformat.rst
+357
-0
No files found.
documentation/source/index.rst
View file @
b2512891
...
@@ -13,6 +13,7 @@ Contents:
...
@@ -13,6 +13,7 @@ Contents:
rest.rst
rest.rst
slap.rst
slap.rst
tioformat.rst
Indices and tables
Indices and tables
==================
==================
...
...
documentation/source/tioformat.rst
0 → 100644
View file @
b2512891
Tio Format
**********
What is TioFormat?
------------------
TIO is a data format used to provide informations about consumption, invoicing
and state history.
XSD
---
`TioFormat XSD`::
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- Define the XML Schema of a transaction -->
<xs:element name="journal">
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="start_date" type="xs:string"/>
<xs:element name="stop_date" type="xs:string"/>
<xs:element name="reference" type="xs:string"/>
<xs:element name="currency" type="xs:string"/>
<xs:element name="payment_mode" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="arrow" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="destination" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="movement" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="resource" type="xs:string"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:float"/>
<xs:element name="price" type="xs:float"/>
<xs:element name="VAT" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Schema Components
-----------------
Element: ``journal``
++++++++++++++++++++
=============== =======
`Name` journal
`Type` journal
`Documentation` journal is the root element in the XML file
=============== =======
`Schema Component Representation`::
<xs:element name="journal">
Complex Type: ``journal``
+++++++++++++++++++++++++
=============== =======
`Name` journal
`Documentation` Tio document contains transactions
=============== =======
`Schema Component Representation`::
<xs:complexType>
<xs:sequence>
<xs:element name="transaction" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
Complex Type: ``transaction``
+++++++++++++++++++++++++++++
=============== =======
`Name` transaction
`Documentation` transaction contains a title, a start_date, a stop_date, a reference, a currency, a payment mode, some categories, some arrows and a list of movement.
=============== =======
`Schema Component Representation`::
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="start_date" type="xs:string"/>
<xs:element name="stop_date" type="xs:string"/>
<xs:element name="reference" type="xs:string"/>
<xs:element name="currency" type="xs:string"/>
<xs:element name="payment_mode" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="arrow" maxOccurs="unbounded">
</xs:element>
<xs:element name="movement" maxOccurs="unbounded">
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
Element: ``title``
++++++++++++++++++
=============== =======
`Name` title
`Type` string
`Documentation` title is the name of the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="title" type="xs:string" minOccurs="0"/>
Element: ``start_date``
+++++++++++++++++++++++
=============== =======
`Name` start_date
`Type` string
`Documentation` the date at which a service started
=============== =======
`Schema Component Representation`::
<xs:element name="start_date" type="xs:string"/>
Element: ``stop_date``
++++++++++++++++++++++
=============== =======
`Name` stop_date
`Type` string
`Documentation` the date at which a service was completed
=============== =======
`Schema Component Representation`::
<xs:element name="stop_date" type="xs:string"/>
Element: ``reference``
++++++++++++++++++++++
=============== =======
`Name` reference
`Type` string
`Documentation` absolute reference of the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="reference" type="xs:string"/>
Element: ``currency``
+++++++++++++++++++++
=============== =======
`Name` currency
`Type` string
`Documentation` currency used in the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="currency" type="xs:string"/>
Element: ``payment_mode``
+++++++++++++++++++++++++
=============== =======
`Name` payment_mode
`Type` string
`Documentation` payment mode of the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="payment_mode" type="xs:string"/>
Element: ``category``
+++++++++++++++++++++
=============== =======
`Name` category
`Type` string
`Documentation` To add your own category section in the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
Element: ``arrow``
++++++++++++++++++
=============== =======
`Name` arrow
`Type` arrow
`Documentation` represents who provided a service to somebody else
=============== =======
`Schema Component Representation`::
<xs:element name="arrow" maxOccurs="unbounded">
Complex Type: ``arrow``
+++++++++++++++++++++++
=============== =======
`Name` arrow
`Documentation` contains a source and a destination.
=============== =======
`Schema Component Representation`::
<xs:complexType>
<xs:sequence>
<xs:element name="source" type="xs:string" minOccurs="0"/>
<xs:element name="destination" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="type" use="required"/>
</xs:complexType>
Element: ``source``
+++++++++++++++++++
=============== =======
`Name` source
`Type` string
`Documentation` who provided the service
=============== =======
`Schema Component Representation`::
<xs:element name="source" type="xs:string" minOccurs="0"/>
Element: ``destination``
++++++++++++++++++++++++
=============== =======
`Name` destination
`Type` string
`Documentation` who received the service
=============== =======
`Schema Component Representation`::
<xs:element name="destination" type="xs:string" minOccurs="0"/>
Element: ``movement``
+++++++++++++++++++++
=============== =======
`Name` movement
`Type` movement
`Documentation` represents how much service exchanged in the transaction
=============== =======
`Schema Component Representation`::
<xs:element name="movement" maxOccurs="unbounded">
Complex Type: ``movement``
++++++++++++++++++++++++++
=============== =======
`Name` movement
`Documentation` contains a resource, a title, a reference, a quantity, a price, a VAT and some categories
=============== =======
`Schema Component Representation`::
<xs:complexType>
<xs:sequence>
<xs:element name="resource" type="xs:string"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="reference" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:float"/>
<xs:element name="price" type="xs:float"/>
<xs:element name="VAT" type="xs:string"/>
<xs:element name="category" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Element: ``resource``
+++++++++++++++++++++
=============== =======
`Name` resource
`Type` string
`Documentation` represents the kind of service provided
=============== =======
`Schema Component Representation`::
<xs:element name="resource" type="xs:string"/>
Element: ``quantity``
+++++++++++++++++++++
=============== =======
`Name` quantity
`Type` float
`Documentation` represents the amount of service exchanged
=============== =======
`Schema Component Representation`::
<xs:element name="quantity" type="xs:string"/>
Element: ``price``
++++++++++++++++++
=============== =======
`Name` price
`Type` float
`Documentation` represents the price of service exchanged
=============== =======
`Schema Component Representation`::
<xs:element name="price" type="xs:string"/>
Element: ``VAT``
++++++++++++++++
=============== =======
`Name` VAT
`Type` string
`Documentation` represents the VAT of service exchanged
=============== =======
`Schema Component Representation`::
<xs:element name="VAT" type="xs:string"/>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment