Skip to content

Instantly share code, notes, and snippets.

@decagondev
Created February 18, 2025 16:55
Show Gist options
  • Select an option

  • Save decagondev/d6dbcb2aed115a7292531c5c14f1093e to your computer and use it in GitHub Desktop.

Select an option

Save decagondev/d6dbcb2aed115a7292531c5c14f1093e to your computer and use it in GitHub Desktop.

Superyacht Technology Platform - Integrated Database Schema Diagram

classDiagram
    class User {
        +String email
        +String password
        +String firstName
        +String lastName
        +String role
        +ObjectId company
        +String profileImage
        +String[] specializations
        +ObjectId[] projects
        +ObjectId[] savedTechnologies
        +Date lastLogin
        +Object[] refreshTokens
        +Date createdAt
        +Date updatedAt
        +comparePassword(candidatePassword)
        +generateAuthToken()
        +generateRefreshToken()
    }
    
    class Company {
        +String name
        +String logo
        +String website
        +String description
        +String type
        +String contactEmail
        +String contactPhone
        +Object address
        +ObjectId[] technologies
        +ObjectId[] pitchVideos
        +ObjectId[] employees
        +Number yearFounded
        +Object socialMedia
        +Date createdAt
        +Date updatedAt
    }
    
    class Technology {
        +String name
        +ObjectId supplier
        +String category
        +String subcategory
        +String description
        +Object technicalSpecs
        +String installationRequirements
        +String[] certifications
        +String[] images
        +String[] manuals
        +String[] datasheets
        +ObjectId[] videos
        +Object pricing
        +String[] compatibilities
        +Date releaseDate
        +String[] tags
        +Object[] ratings
        +Number averageRating
        +Date createdAt
        +Date updatedAt
    }
    
    class Project {
        +String name
        +String codeName
        +String description
        +String client
        +ObjectId manager
        +ObjectId[] team
        +ObjectId shipyard
        +Object yachtDetails
        +Object[] selectedTechnologies
        +Object budget
        +Object timeline
        +String status
        +Object[] documents
        +Date createdAt
        +Date updatedAt
    }
    
    class Video {
        +String title
        +String description
        +String url
        +String thumbnailUrl
        +String type
        +Number duration
        +Object uploadedBy
        +ObjectId relatedTechnology
        +String[] tags
        +Number views
        +Number likes
        +Date uploadDate
        +Date updatedAt
    }
    
    User --> Company : company
    User --> Project : projects
    User --> Technology : savedTechnologies
    Company --> Technology : technologies
    Company --> Video : pitchVideos
    Company --> User : employees
    Technology --> Video : videos
    Project --> User : manager
    Project --> User : team
    Project --> Company : shipyard
    Project --> Technology : selectedTechnologies
    Video --> User : uploadedBy.user
    Video --> Company : uploadedBy.company
    Video --> Technology : relatedTechnology
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment