initial commit
This commit is contained in:
8
app/models/client.rb
Normal file
8
app/models/client.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Client < ApplicationRecord
|
||||
has_many :client_subprojects, class_name: 'Subproject', foreign_key: 'client_id'
|
||||
has_many :owner_subprojects, class_name: 'Subproject', foreign_key: 'owner_id'
|
||||
has_many :builder_subprojects, class_name: 'Subproject', foreign_key: 'builder_id'
|
||||
|
||||
validates :company_name, :firstname, :lastname, presence: true
|
||||
# Add other validations as needed
|
||||
end
|
||||
Reference in New Issue
Block a user