Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: model for rail transportation and shipping #3833

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions synapse/models/geospace.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ def getModelDefs(self):
('geo:place:taxonomy', {}, ()),
('geo:place', {}, (

('id', ('str', {'strip': True}), {
'doc': 'A type specific identifier such as an airport ID.'}),

('name', ('geo:name', {}), {
'doc': 'The name of the place.'}),

Expand Down
26 changes: 25 additions & 1 deletion synapse/models/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,31 @@ def getModelDefs(self):

('mass', ('hugenum', {'units': massunits}), {
'doc': 'A mass which converts to grams as a base unit.'}),
# TODO add base type for volume
),

'interfaces': (

('phys:object', {
'doc': 'Properties common to all physical objects.',
'template': {'phys:object': 'object'},
'props': (

('phys:mass', ('mass', {}), {
'doc': 'The mass of the {phys:object}.'}),

('phys:volume', ('geo:dist', {}), {
'doc': 'The cubed volume of the {phys:object}.'}),

('phys:length', ('geo:dist', {}), {
'doc': 'The length of the {phys:object}'}),

('phys:width', ('geo:dist', {}), {
'doc': 'The width of the {phys:object}'}),

('phys:height', ('geo:dist', {}), {
'doc': 'The height of the {phys:object}'}),
),
),
),

'forms': (
Expand Down
Loading
Loading