/* (c) Copyright 2017, tranSMART Foundation, Inc. */

package org.transmartproject.db.storage

import org.transmartproject.db.i2b2data.Study

/**
 * Created by piotrzakrzewski on 02/12/2016.
 */
class LinkedFileCollection {

    Study study // Id of the Study with which the collection is associated
    String uuid // uniformly unique identifier generated by the source system
    StorageSystem sourceSystem // origin of the collection
    String name  // name of the collection, or name the file for single file collection systems (e.g. MongoDB)

    static belongsTo = [
            sourceSystem:        StorageSystem,
    ]

    static mapping = {
        table          schema:   'I2B2DEMODATA'
        id generator: 'sequence', params: [sequence: 'hibernate_sequence', schema: 'biomart']
        version false
    }

    static constraints = {
        sourceSystem nullable: false
    }
}
