from django.contrib import admin
from .models import Company, Profile, AIChatHistory

@admin.register(Company)
class CompanyAdmin(admin.ModelAdmin):
    list_display = ('name', 'tenant_id', 'created_at')
    search_fields = ('name', 'tenant_id')

@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
    list_display = ('user', 'company', 'role')
    list_filter = ('company', 'role')

@admin.register(AIChatHistory)
class AIChatHistoryAdmin(admin.ModelAdmin):
    list_display = ('chat_title', 'ai_chat_engine', 'company', 'chat_last_date')
    list_filter = ('ai_chat_engine', 'company')
    search_fields = ('chat_title', 'chat_content')