summaryrefslogtreecommitdiff
path: root/app/models/sim_card.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/sim_card.rb')
-rw-r--r--app/models/sim_card.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/sim_card.rb b/app/models/sim_card.rb
new file mode 100644
index 0000000..2cbf76b
--- /dev/null
+++ b/app/models/sim_card.rb
@@ -0,0 +1,25 @@
+class SimCard < ActiveRecord::Base
+ attr_accessible :auto_order_card, :sip_account_id, :auth_key, :sim_number
+
+ # Validations
+ #
+ validates :sim_card_provider_id,
+ :presence => true
+
+ belongs_to :sim_card_provider, :touch => true
+
+ validates :sim_card_provider,
+ :presence => true
+
+ validates :sip_account_id,
+ :presence => true
+
+ belongs_to :sip_account
+
+ validates :sip_account,
+ :presence => true
+
+ validates :sim_number,
+ :presence => true
+
+end