Files
ubicloud/model/firewalls_private_subnets.rb
Jeremy Evans 718370f4c9 Convert ResourceMethods to a plugin
Allow plugin to take an etc_type keyword argument for using the
TYPE_ETC ubid type, and remove the separate definitions in every
model that uses the TYPE_ETC ubid type.

This was the cleanest way to DRY things up.  You cannot extend
the models with a module to do this before including ResourceMethods,
because then ResourceMethods::ClassMethods will override it, and
you cannot extend the models with a module to do this after
including ResourceMethods, because the inclusion will not work
correctly due to the eager definition of @ubid_format.

Best reviewed without whitespace differences.
2025-06-04 04:55:45 +09:00

19 lines
627 B
Ruby

# frozen_string_literal: true
require_relative "../model"
class FirewallsPrivateSubnets < Sequel::Model
plugin ResourceMethods, etc_type: true
end
# Table: firewalls_private_subnets
# Primary Key: (private_subnet_id, firewall_id)
# Columns:
# private_subnet_id | uuid |
# firewall_id | uuid |
# Indexes:
# firewalls_private_subnets_pkey | PRIMARY KEY btree (private_subnet_id, firewall_id)
# Foreign key constraints:
# firewalls_private_subnets_firewall_id_fkey | (firewall_id) REFERENCES firewall(id)
# firewalls_private_subnets_private_subnet_id_fkey | (private_subnet_id) REFERENCES private_subnet(id)