Rezervacije
This commit is contained in:
7
app/models/customer.rb
Normal file
7
app/models/customer.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Customer < ApplicationRecord
|
||||
belongs_to :company
|
||||
|
||||
validates :name, presence: true, uniqueness: { scope: :company_id }
|
||||
validates :phone, presence: true
|
||||
validates :company_id, presence: true
|
||||
end
|
||||
Reference in New Issue
Block a user