debian-mirror-gitlab/app/models/serverless/domain_cluster.rb

15 lines
481 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
module Serverless
class DomainCluster < ApplicationRecord
self.table_name = 'serverless_domain_cluster'
belongs_to :pages_domain
belongs_to :knative, class_name: 'Clusters::Applications::Knative', foreign_key: 'clusters_applications_knative_id'
belongs_to :creator, class_name: 'User', optional: true
validates :pages_domain, :knative, :uuid, presence: true
validates :uuid, uniqueness: true, length: { is: 14 }
end
end