-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel.rb
27 lines (20 loc) · 829 Bytes
/
model.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require './model_base'
module ArduinoGateway
module Model
module ModelTemplates
# ResourceDevice - implementation of resource device data structure description classes
class ResourceDevice < ::ArduinoGateway::Model::AbstractRecord
database_attributes :name, :ip, :port
end
# ResourceInstance
class ResourceInstance < ::ArduinoGateway::Model::AbstractRecord
database_attributes :name, :device_id, :service_type_id, :post_enabled, :range_max, :range_min
end
# ResourceService - implementation of resource device data structure description classes
# consider making this a database of ServiceTypes with: 1. name, 2. id
class ResourceService < ::ArduinoGateway::Model::AbstractRecord
database_attributes :name
end
end
end
end