Created
August 2, 2019 08:46
-
-
Save gemmadlou/459a27338edf046d8dff03803c9589a3 to your computer and use it in GitHub Desktop.
Dyanmoose Model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dynamoose = require('dynamoose'); | |
dynamoose.AWS.config.update({ | |
region: 'eu-west-1' | |
}); | |
const schema = new dynamoose.Schema({ | |
entity: { | |
type: String, | |
hashKey: true, | |
}, | |
uniqid: { | |
type: String, | |
rangeKey: true | |
}, | |
uniqid_type: String, | |
licence_id: Number, | |
checksum: String, | |
state_code: String, | |
state: String, | |
region_code: String, | |
region: String, | |
authority_code: String, | |
authority: String, | |
register_id: String, | |
external_id: String, | |
type: String, | |
confidence: String, | |
property_address: String, | |
property_postal: String, | |
property_uprn: String, | |
licencee_name: String, | |
licencee_address: String, | |
licencee_postal: String, | |
manager_name: String, | |
manager_address: String, | |
manager_postal: String, | |
people: Number, | |
households: Number, | |
storeys: Number, | |
rooms: Number, | |
status: String, | |
link: String, | |
date_applied: Date, | |
date_start: Date, | |
date_end: Date, | |
created: Date, | |
updated: Date, | |
deleted: Number, | |
dynamodb_created: Date, | |
dynamodb_updated: Date | |
}); | |
const LicenceUPRN = dynamoose.model('lookup-cache', schema); | |
module.exports = LicenceUPRN; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment