Files
docuseal/app/models/submission.rb
T

28 lines
581 B
Ruby
Raw Normal View History

2023-05-21 17:59:36 +03:00
# frozen_string_literal: true
# == Schema Information
#
# Table name: submissions
#
2023-06-13 00:29:07 +03:00
# id :bigint not null, primary key
# deleted_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
# template_id :bigint not null
2023-05-21 17:59:36 +03:00
#
# Indexes
#
2023-05-31 23:19:20 +03:00
# index_submissions_on_template_id (template_id)
2023-05-21 17:59:36 +03:00
#
# Foreign Keys
#
2023-05-31 23:19:20 +03:00
# fk_rails_... (template_id => templates.id)
2023-05-21 17:59:36 +03:00
#
class Submission < ApplicationRecord
2023-05-31 23:19:20 +03:00
belongs_to :template
2023-05-21 17:59:36 +03:00
2023-06-13 00:29:07 +03:00
has_many :submitters, dependent: :destroy
2023-05-21 17:59:36 +03:00
scope :active, -> { where(deleted_at: nil) }
end