awslabs/dynamodb-data-mapper-js

Declaration Of Scalar Type

jaiminvaja-cue opened this issue · 0 comments

Hey Team
@garnaat @bdonlan @jupiter @trevorrowe @adamclerk

I need your help to declare scalar Type in Model declaration.

Object.defineProperties(Offering.prototype, {
    [DynamoDbTable]: {
        value: 'offering'
    },
    [DynamoDbSchema]: {
        value: {
            storageInfo: {
                type: "Document",
                members: {
                    Investments:{
                        type:"Document",
                        members: {
                            id: {type: "String"},
                            name: {type: "String"},
                            ....
                            ....
                            // It may have some dynamic data which can not be defined statically
                            ....
                            ....
                        }
                    }
                }
            }
        }
    }
}

So could we defined the type for such case?

Any help will be highly appreciated!

Regards,