Skip to content

Commit 467f801

Browse files
remove unneeded to_json
1 parent a8e4009 commit 467f801

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

app/models.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,6 @@ class Category(db.Model):
8282
ConstraintFactory.non_empty_string('name'),
8383
)
8484

85-
def to_json(self):
86-
return {
87-
'id': self.id,
88-
'name': self.name,
89-
'created_at': self.created_at,
90-
}
91-
9285

9386
class Subcategory(db.Model):
9487
__tablename__ = 'subcategory'
@@ -102,13 +95,6 @@ class Subcategory(db.Model):
10295
ConstraintFactory.non_empty_string('name'),
10396
)
10497

105-
def to_json(self):
106-
return {
107-
'id': self.id,
108-
'name': self.name,
109-
'created_at': self.created_at,
110-
}
111-
11298

11399
class Product(db.Model):
114100
__tablename__ = 'product'
@@ -121,11 +107,3 @@ class Product(db.Model):
121107
__table_args__ = (
122108
ConstraintFactory.non_empty_string('name'),
123109
)
124-
125-
def to_json(self):
126-
return {
127-
'id': self.id,
128-
'name': self.name,
129-
'description': self.description,
130-
'created_at': self.created_at,
131-
}

0 commit comments

Comments
 (0)