Dunno what ichanged
This commit is contained in:
parent
4e2780d9be
commit
96f7542104
2 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,6 @@ from app import app, db
|
||||||
from models import User
|
from models import User
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ModelBaseView(ModelView):
|
class ModelBaseView(ModelView):
|
||||||
|
|
||||||
def is_accessible(self):
|
def is_accessible(self):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from app import db
|
from app import db
|
||||||
|
|
||||||
|
|
||||||
# Create database models
|
# Create database models
|
||||||
class User(db.Model):
|
class User(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
|
@ -74,7 +75,6 @@ class Order(db.Model):
|
||||||
stoptime = db.Column(db.DateTime)
|
stoptime = db.Column(db.DateTime)
|
||||||
orders = db.relationship('OrderItem', backref='order', lazy='dynamic')
|
orders = db.relationship('OrderItem', backref='order', lazy='dynamic')
|
||||||
|
|
||||||
|
|
||||||
def configure(self, courrier, location, starttime, stoptime):
|
def configure(self, courrier, location, starttime, stoptime):
|
||||||
self.courrier = courrier
|
self.courrier = courrier
|
||||||
self.location = location
|
self.location = location
|
||||||
|
@ -84,6 +84,7 @@ class Order(db.Model):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Order'
|
return 'Order'
|
||||||
|
|
||||||
|
|
||||||
class OrderItem(db.Model):
|
class OrderItem(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
|
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
|
||||||
|
|
Loading…
Reference in a new issue