feat: plantilla base workspace SaaS
This commit is contained in:
16
backend/api/v1/modules/example/models.py
Normal file
16
backend/api/v1/modules/example/models.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from sqlalchemy import Integer, String, Text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
|
||||
from core.database import Base
|
||||
|
||||
|
||||
class Item(Base, TenantScopedMixin, TimestampMixin):
|
||||
"""Modelo de ejemplo — renombra y ajusta a tu entidad de negocio."""
|
||||
|
||||
__tablename__ = "example_items"
|
||||
__table_args__ = {"schema": "public"}
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
description: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
Reference in New Issue
Block a user