debian-mirror-gitlab/app/models/airflow/dags.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
410 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# 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