22 lines
530 B
Python
22 lines
530 B
Python
from sqlalchemy import Column, Integer, String
|
|
|
|
class User(Base):
|
|
__tablename__ = 'usuario'
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
username = Column(String(20))
|
|
nombre = Column(String(20))
|
|
rol = Column(String(20))
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
class Producto(Base):
|
|
__tablename__ = 'producto'
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
price = Column(float())
|
|
nombre = Column(String(20))
|
|
rol = Column(String(20))
|
|
|
|
class Config:
|
|
orm_mode = True
|