overseer-js-sdk
Version:
This SDK for Overseer.
37 lines (35 loc) • 1.1 kB
JavaScript
(function () {
this.Addresses = function () {}
Addresses.prototype = Object.create(Collection.prototype);
Addresses.prototype.constructor = Addresses;
Addresses.prototype.model = function (attributes) {
return new Address(attributes);
}
}());
(function () {
this.Address = function (attributes) {
this.attributes = {};
this.oldAttributes = {};
this.fillable = {
id: 'integer',
addressable_id: 'integer',
addressable_type: 'string',
street_number: 'string',
street_name: 'string',
city: 'string',
country: 'string',
lat: 'float',
lng: 'float',
place_id: 'string',
district: 'string',
postal_code: 'string',
apartments: 'string',
created_at: 'timestamp',
updated_at: 'timestamp',
};
this.relations = {};
this.fill(attributes);
}
Address.prototype = Object.create(Model.prototype);
Address.prototype.constructor = Address;
}());