Skip to content

Instantly share code, notes, and snippets.

@gemmadlou
Created August 2, 2019 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gemmadlou/459a27338edf046d8dff03803c9589a3 to your computer and use it in GitHub Desktop.
Save gemmadlou/459a27338edf046d8dff03803c9589a3 to your computer and use it in GitHub Desktop.
Dyanmoose Model
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