feat: Funcion de sistema tenants
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
Tenant Model - ServiceManagerWeb
|
||||
Modelo para organizaciones cliente (multi-tenancy)
|
||||
"""
|
||||
from sqlalchemy import String, Integer, Text, Boolean, ARRAY
|
||||
from sqlalchemy import String, Integer, Text, Boolean, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from sqlalchemy.dialects.postgresql import UUID, ENUM
|
||||
from sqlalchemy.dialects.postgresql import UUID, ENUM, ARRAY as PG_ARRAY
|
||||
from typing import List, Optional
|
||||
import enum
|
||||
import uuid
|
||||
@@ -40,7 +40,7 @@ class Tenant(Base):
|
||||
max_users: Mapped[int] = mapped_column(Integer, default=50)
|
||||
max_storage_mb: Mapped[int] = mapped_column(Integer, default=1024)
|
||||
allowed_file_types: Mapped[List[str]] = mapped_column(
|
||||
ARRAY(String),
|
||||
JSON().with_variant(PG_ARRAY(String), "postgresql"),
|
||||
default=["pdf", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "txt"]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user