24 lines
566 B
Python
24 lines
566 B
Python
# SPDX-License-Identifier: WTFPL
|
|
|
|
from .dbrecord import DbRecord
|
|
|
|
class Storage(DbRecord):
|
|
|
|
table = "storage"
|
|
pk_field = "sid"
|
|
fields = ('vid', 'sname', 'stype', 'capacity', 'capaunit',
|
|
'x', 'y', 'z', 'wx', 'wy', 'wz', 'angle', 'color', 'remarks')
|
|
|
|
def __init__(self, db, sid=None):
|
|
super().__init__(db, sid)
|
|
self.title = _("Storage({})")
|
|
|
|
def save(self, commit=True):
|
|
super().save()
|
|
if commit:
|
|
self.conn.commit()
|
|
|
|
def delete(self):
|
|
# there must be no assiciated data!
|
|
pass
|