first push
This commit is contained in:
19
backend/models/Images.py
Normal file
19
backend/models/Images.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from database.database import db
|
||||
|
||||
class Image(db.Model):
|
||||
__tablename__ = 'image'
|
||||
|
||||
image_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
image_path = db.Column(db.String(500), nullable=False)
|
||||
project_id = db.Column(db.Integer, nullable=False)
|
||||
width = db.Column(db.Float)
|
||||
height = db.Column(db.Float)
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'image_id': self.image_id,
|
||||
'image_path': self.image_path,
|
||||
'project_id': self.project_id,
|
||||
'width': self.width,
|
||||
'height': self.height
|
||||
}
|
||||
Reference in New Issue
Block a user