1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
royalnet/pycharm_templates/table.vm

16 lines
382 B
Text
Raw Normal View History

2020-01-30 18:37:23 +00:00
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declared_attr
2020-02-03 23:15:33 +00:00
# noinspection PyAttributeOutsideInit
2020-01-30 18:37:23 +00:00
#set($CAPITALIZED_NAME = $NAME.substring(0,1).toUpperCase() + $NAME.substring(1))
class ${CAPITALIZED_NAME}:
__tablename__ = "${NAME}"
@declared_attr
def id(self):
return Column(Integer, primary_key=True)
...