Flask/project_name/models.py
Simon Diesenreiter 5efd61d236
Some checks failed
CI / linter (ubuntu-latest, 3.9) (push) Failing after 1m29s
Rename the project from template / rename-project (push) Has been skipped
CI / tests_linux (ubuntu-latest, 3.9) (push) Has been skipped
initial commit
2024-11-10 07:27:36 -08:00

17 lines
467 B
Python

from sqlalchemy_serializer import SerializerMixin
from project_name.ext.database import db
class Product(db.Model, SerializerMixin):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(140))
price = db.Column(db.Numeric())
description = db.Column(db.Text)
class User(db.Model, SerializerMixin):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(140))
password = db.Column(db.String(512))