debian-mirror-gitlab/app/models/airflow/dags.rb
2023-04-23 21:23:45 +05:30

14 lines
410 B
Ruby

# frozen_string_literal: true
module Airflow
class Dags < ApplicationRecord
belongs_to :project
validates :project, presence: true
validates :dag_name, length: { maximum: 255 }, presence: true
validates :schedule, length: { maximum: 255 }
validates :fileloc, length: { maximum: 255 }
scope :by_project_id, ->(project_id) { where(project_id: project_id).order(id: :asc) }
end
end