class Product(db.Model): product_id = db.Column(db.Integer, primary_key=True) product_name = db.Column(db.String(100), nullable=False, unique=True) price = db.Column(db.Numeric(12, 2), nullable=False) def __repr__(self): return '<Product %r>' % self.product_name
class Review(db.Model): review_id = db.Column(db.Integer, primary_key=True) customer_id = db.Column(db.Integer, db.ForeignKey('customer.customer_id'), nullable=False) content = db.Column(db.String(10000), nullable=False) review_date = db.Column(db.DateTime, nullable=False) def __repr__(self): return '<Review %r>' % self.review_id
class Customer(db.Model): customer_id = db.Column(db.Integer, primary_key=True) customer_name = db.Column(db.String(100), nullable=False) def __repr__(self): return '<Customer %r>' % self.customer_name
class Agronomist(db.Model): agronomist_id = db.Column(db.Integer, primary_key=True) agronomist_name = db.Column(db.String(100), nullable=False) def __repr__(self): return '<Agronomist %r>' % self.agronomist_name
class Sort(db.Model): sort_id = db.Column(db.Integer, primary_key=True) sort_name = db.Column(db.String(100), nullable=False, unique=True) def __repr__(self): return '<Sort %r>' % self.sort_name