details:
    type: libraryRecordSoftware
    name: Records - Software
    table: gibbonLibraryItem
    modes: { update: true, insert: true, export: true }
access:
    module: Library
    action: Manage Catalog
primaryKey:
    gibbonLibraryItemID
uniqueKeys:
    - id
table:
    gibbonLibraryTypeID: 
        name: "Type"
        desc: ""
        value: "Software"
        args: { filter: string, required: true, custom: true, hidden: true }
        relationship: { table: gibbonLibraryType, key: gibbonLibraryTypeID, field: name  }
    name: 
        name: "Name"
        desc: "Volume or product name."
        args: { filter: string, required: true }
    id: 
        name: "ID"
        desc: "Must be unique, or will lead to update not insert."
        args: { filter: string, required: true }
    producer: 
        name: "Author/Brand"
        desc: "Who created the item?"
        args: { filter: string, required: true, custom: true }
    vendor: 
        name: "Vendor"
        desc: "Who supplied the item?"
        args: { filter: string, custom: true }
    purchaseDate: 
        name: "Purchase Date"
        desc: ""
        args: { filter: date, custom: true }
    invoiceNumber: 
        name: "Invoice Number"
        desc: ""
        args: { filter: string, custom: true }
    cost: 
        name: "Cost"
        desc: ""
        args: { filter: numeric, custom: true }
    gibbonSpaceID: 
        name: "Location"
        desc: "Name"
        args: { filter: string, custom: true }
        relationship: { table: gibbonSpace, key: gibbonSpaceID, field: name }
    locationDetail: 
        name: "Location Detail"
        desc: "Shelf, cabinet, sector, etc"
        args: { filter: string, custom: true }
    ownershipType: 
        name: "Ownership Type"
        desc: ""
        args: { filter: string, custom: true }
    gibbonPersonIDOwnership: 
        name: "Main User"
        desc: "Username or email of person the device is assigned to."
        args: { filter: string, custom: true }
        relationship: { table: gibbonPerson, key: gibbonPersonID, field: username|email  }
    gibbonDepartmentID:
        name: "Department"
        desc: "Short Name"
        args: { filter: string, custom: true }
        relationship: { table: gibbonDepartment, key: gibbonDepartmentID, field: nameShort  }
    borrowable: 
        name: "Borrowable?"
        desc: "Is item available for loan?"
        args: { filter: yesno, custom: true }
    status: 
        name: "Status?"
        desc: ""
        args: { filter: string, custom: true }
    replacement: 
        name: "Replacement?"
        desc: ""
        args: { filter: yesno, custom: true }
    replacementCost: 
        name: "Replacement Cost"
        desc: ""
        args: { filter: numeric, custom: true }
    gibbonSchoolYearIDReplacement : 
        name: "Replacement Year"
        desc: "School year name, as set in School Admin. Must already exist."
        args: { filter: schoolyear, custom: true }
        relationship: { table: gibbonSchoolYear, key: gibbonSchoolYearID, field: name  }
    comment: 
        name: "Comments/Notes"
        desc: ""
        args: { filter: string, custom: true  }

    # Type-Specific Serializable Fields

    fieldVersion: 
        name: "Version"
        desc: ""
        args: { filter: string, custom: true, readonly: true, serialize: fields  }
    fieldOS: 
        name: "Operating System"
        desc: ""
        args: { filter: string, custom: true, readonly: true, serialize: fields  }
    fieldLicenseType: 
        name: "License Type"
        desc: "E.g. Open Source, Site License, number of users."
        args: { filter: string, custom: true, readonly: true, serialize: fields  }
    fieldLicenseName: 
        name: "License Name"
        desc: "If the software is registered, who is it registered to?"
        args: { filter: string, custom: true, readonly: true, serialize: fields  }
    fieldSerialNumber: 
        name: "License Serial Number"
        desc: ""
        args: { filter: string, custom: true, readonly: true, serialize: fields  }
    fieldExpiry: 
        name: "License Expiry"
        desc: ""
        args: { filter: date, custom: true, readonly: true, serialize: fields  }
    fieldLink: 
        name: "License Management Link"
        desc: "Link to web-based management tool."
        args: { filter: url, custom: true, readonly: true, serialize: fields  }
    fields:
        name: "Type-Specific Details"
        desc: ""
        args: { filter: string, serialize: fields, hidden: true, custom: true }
