Added Models App, Installation Batch Installation

This commit is contained in:
Ernest Sankeshwar
2015-11-13 15:03:29 +00:00
parent cffea0c31d
commit 5a81168161
15 changed files with 147 additions and 1 deletions

4
app/models/app.rb Normal file
View File

@@ -0,0 +1,4 @@
class App < ActiveRecord::Base
validates :name, :package_name, presence: true
end

View File

@@ -0,0 +1,3 @@
class BatchInstallation < ActiveRecord::Base
belongs_to :app
end

View File

@@ -0,0 +1,9 @@
class Installation < ActiveRecord::Base
enum status: [:pushed, :downloaded, :cancelled, :installed]
belongs_to :device
belongs_to :batch_installation
end