---
config:
    layout: elk
---
classDiagram
    %% Models
    class OwnTrackLog {
        +CharField tid
        +FloatField lat
        +FloatField lon
        +DateTimeField creation_time
        +__str__()
    }

    %% Admin Classes
    class OwnTrackLogsAdmin {
        # 空管理类，使用默认配置
    }

    %% App Config
    class OwntracksConfig {
        +name
    }

    %% Test Classes
    class OwnTrackLogTest {
        +setUp()
        +test_own_track_log()
    }

    %% Views (作为功能模块表示)
    class ViewFunctions {
        <<Module>>
        +manage_owntrack_log()
        +show_maps()
        +show_log_dates()
        +convert_to_amap()
        +get_datas()
    }

    %% URL Patterns
    class URLConfig {
        <<Module>>
        +logtracks
        +show_maps
        +get_datas
        +show_dates
    }

    %% External Dependencies
    class BlogUser {
        <<External>>
        +create_superuser()
    }

    class AMapAPI {
        <<External>>
        +坐标转换服务
    }

    %% Relationships
    OwnTrackLogsAdmin --> OwnTrackLog : 管理
    OwnTrackLogTest --> OwnTrackLog : 测试
    OwnTrackLogTest --> BlogUser : 创建测试用户
    
    ViewFunctions --> OwnTrackLog : 创建/查询
    ViewFunctions --> AMapAPI : 调用坐标转换
    
    URLConfig --> ViewFunctions : 路由映射
    
    OwntracksConfig ..> OwnTrackLog : 应用配置