

type FuzzyDate {
    Operator: String
    Day: Int
    Month: Int
    Year: Int
    Comment: String
}


type User {
    ID: Int!
    Name: String!
    Email: String
    Password: String

    MaintainerOf: UserRecords

    # Enhanced Data
    uuid: String
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type UserRecords {
    ReleaseIDs: [Int]
    GroupIDs: [Int]
    ScenerIDs: [Int]
    HandleIDs: [Int]
    EventIDs: [Int]
    BBSIDs: [Int]
    SIDIDs: [Int]
}




type Release {
    ID: Int!
    Name: String!
    AKA: String
    Type: String        # should go in tag
    GfxType: String     # should go in tag
    Rating: Float
    ReleaseDate: [FuzzyDate]

    ReleasedAt: Int
    ReleasedAtEvent: Event
    Achievement: ReleaseAchievement
    ReleasedBy: ReleaseGroupsHandles
    Credits: [ReleaseCredit]

    Website: String
    ScreenShot: [String]
    DownloadLinks: [ReleaseDownload]
    OtherLinks: [ReleaseLink]

    Comments: [ReleaseComment]

    SIDIDs: [Int]
    SIDs: [SID]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type ReleaseAchievement {
    Compo: String
    Place: Int
}

type ReleaseGroupsHandles {
    GroupIDs: [Int]
    Groups: [Group]
    HandleIDs: [Int]
    Handles: [Handle]
}

type ReleaseCredit {
    CreditType: String!
    HandleIDs: [Int]
    Handles: [Handle]
}

type ReleaseLink {
    Title: String
    Link: String!
    CounterLink: String!
    Clicks: Int
}

type ReleaseDownload {
    CounterLink: String!
    Downloads: Int
    Filename: String
    Link: String!
    Status: String
    hash: String
}

type ReleaseComment {
    Summary: [ReleaseCommentData]
    Trivia: [ReleaseCommentData]
    Goof: [ReleaseCommentData]
    HiddenPart: [ReleaseCommentData]
    ProductionNote: [ReleaseCommentData]
    UserComment: [ReleaseCommentData]
}

type ReleaseCommentData {
    Date: Int!
    HandleID: Int!
    Handle: Handle
    Text: String!
}




type Group {
    ID: Int!
    Name: String!
    AKA: String
    Short: String
    Rating: Float
    Trivia: String
    BaseCountry: String

    FoundDate: [FuzzyDate]
    DissolveDate: [FuzzyDate]

    Website: String
    Grouptypes: [String]
    Slogan: [String]

    FounderHandleIDs: [Int]
    FounderHandles: [Handle]
    OrganizedEventIDs: [Int]
    OrganizedEvents: [Event]
    Members: [GroupMember]

    ReleaseIDs: [Int]
    Releases: [Release]
    BBSIDs: [Int]
    BBSs: [BBS]

    UserComment: [GroupCommentData]

    # Enhanced Data
    CoOpGroupIDs: [Int]
    CoOpGroups: [Group]

    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type GroupCommentData {
    Date: Int!
    HandleID: Int!
    Handle: Handle
    Text: String!
}

type GroupMember {
    HandleID: Int!
    Handle: Handle
    Profession: [String]

    JoinDate: [FuzzyDate]
    LeaveDate: [FuzzyDate]

    Status: String
}




type Scener {
    ID: Int!
    RegisterdDate: String
    Country: String

    BirthDate: [FuzzyDate]
    DeathDate: [FuzzyDate]

    HandleIDs: [Int]
    Handles: [Handle]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}




type Handle {
    ID: Int!
    Handle: String!
    CurrentlyUsedHandle: Boolean
    HandleStory: String
    FreelanceFunctions: [String]
    MemberOf: [HandleGroup]
    Credits: [HandleCredit]

    FoundedGroupIDs: [Int]
    FoundedGroups: [Group]
    MemberGroupIDs: [Int]
    MemberGroups: [Group]

    OrganizedEventIDs: [Int]
    OrganizedEvents: [Event]
    AttendedEventIDs: [Int]
    AttendedEvents: [Event]

    BBSSysopIDs: [Int]
    BBSSysop: [BBS]
    BBSUserIDs: [Int]
    BBSUser: [BBS]

    ReleaseIDs: [Int]
    Releases: [Release]
    ScenerIDs: [Int]
    Sceners: [Scener]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type HandleGroup {
    GroupID: Int!
    MemberStats: GroupMember
    Group: Group
}

type HandleCredit {
    CreditType: String!
    ReleaseIDs: [Int]
    Releases: [Release]
}




type Event {
    ID: Int!
    Name: String!
    EventType: [String]
    AKA: String
    Tagline: String

    StartDate: [FuzzyDate]
    EndDate: [FuzzyDate]

    Address: String
    City: String
    State: String
    Zip: String
    Country: String
    Website: String

    Organizers: EventOrganizers
    Compo: [EventCompo]
    PartyReport: [EventReport]
    UserComment: [EventComment]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type EventCompo {
    Type: String
    ReleaseIDs: [Int]
    Releases: [Release]
}

type EventReport {
    HandleID: Int!
    WrittenBy: String
    Date: Int
    Headline: String
    Text: String
    Handle: Handle
}

type EventComment {
    HandleID: Int!
    Date: Int!
    Text: String!
    Handle: Handle
}

type EventOrganizers {
    GroupIDs: [Int]
    Groups: [Group]
    HandleIDs: [Int]
    Handles: [Handle]
}




type BBS {
    ID: Int!
    Name: String!
    Short: String
    Trivia: String
    OnlinePeriod: [BBSOnlinePeriod]
    Phone: String
    Host: String
    Port: Int
    City: String
    State: String
    Country: String

    Sysop: [BBSSysop]
    Status: String

    GroupIDs: [Int]
    Groups: [Group]
    HandleIDs: [Int]
    Handles: [Handle]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}

type BBSOnlinePeriod {
    StartDate: [FuzzyDate]
    EndDate: [FuzzyDate]
}

type BBSSysop {
    Type: String
    HandleID: Int
    Handle: Handle
}




type SID {
    ID: Int!
    HVSCPath: String
    Name: String
    Author: String
    Released: String
    LoadAddr: Int
    InitAddr: Int
    PlayAddr: Int
    NOSongs: Int
    DefaultSong: Int
    SIDModel: String
    ClockSpeed: String
    DataSize: Int

    ReleaseIDs: [Int]
    Releases: [Release]

    # Enhanced Data
    uuid: String
    tags: [String]
    dateCreated: String
    dateUpdated: String
    deleted: Boolean
    dateDeleted: String
}




type Query {
    release(id: Int!) : Release
    releases(id: [Int]!) : [Release]

    group(id: Int!) : Group
    groups(id: [Int]!) : [Group]

    scener(id: Int!) : Scener
    sceners(id: [Int]!) : [Scener]

    handle(id: Int!) : Handle
    handles(id: [Int]!) : [Handle]

    event(id: Int!) : Event
    events(id: [Int]!) : [Event]

    bbs(id: Int!) : BBS
    bbss(id: [Int]!) : [BBS]

    sid(id: Int!) : SID
    sids(id: [Int]!) : [SID]
}

type Mutation {
    createRelease(id: Int!) : Release
    createGroup(id: Int!) : Group
    createScener(id: Int!) : Scener
    createHandle(id: Int!) : Handle
    createEvent(id: Int!) : Event
    createBBS(id: Int!) : BBS
    createSID(id: Int!) : SID

    updateRelease(id: Int!) : Release
    updateGroup(id: Int!) : Group
    updateScener(id: Int!) : Scener
    updateHandle(id: Int!) : Handle
    updateEvent(id: Int!) : Event
    updateBBS(id: Int!) : BBS
    updateSID(id: Int!) : SID

    deleteRelease(id: Int!) : Release
    deleteGroup(id: Int!) : Group
    deleteScener(id: Int!) : Scener
    deleteHandle(id: Int!) : Handle
    deleteEvent(id: Int!) : Event
    deleteBBS(id: Int!) : BBS
    deleteSID(id: Int!) : SID
}
