add item
This commit is contained in:
parent
28ee777ed1
commit
0cd4b178fd
@ -1,2 +1,3 @@
|
||||
from .user import User
|
||||
from .role import Role
|
||||
from .item import Item
|
||||
|
19
src/models/item.py
Normal file
19
src/models/item.py
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
from sqlalchemy import func
|
||||
|
||||
from utils import db
|
||||
|
||||
"""
|
||||
Item model
|
||||
"""
|
||||
|
||||
__author__ = '@tormakris'
|
||||
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||
__module_name__ = "item"
|
||||
__version__text__ = "1"
|
||||
|
||||
|
||||
class Item(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
name = db.Column(db.String, nullable=False)
|
||||
creation_date = db.Column(db.TIMESTAMP, nullable=False, server_default=func.now())
|
@ -4,7 +4,7 @@ from flask_security import RoleMixin
|
||||
from utils import db
|
||||
|
||||
"""
|
||||
Database models
|
||||
Role model
|
||||
"""
|
||||
|
||||
__author__ = '@tormakris'
|
||||
|
@ -5,7 +5,7 @@ from .role import roles_users
|
||||
from utils import db
|
||||
|
||||
"""
|
||||
Database models
|
||||
User model
|
||||
"""
|
||||
|
||||
__author__ = '@tormakris'
|
||||
|
Loading…
Reference in New Issue
Block a user