72 lines
1.9 KiB
Ruby
72 lines
1.9 KiB
Ruby
# == Schema Information
|
|
#
|
|
# Table name: action_nodes
|
|
#
|
|
# id :integer not null, primary key
|
|
# name :string(255)
|
|
# full_name :string(255)
|
|
# description :string(255)
|
|
# icon :string(255)
|
|
# action_node_types_id :integer
|
|
# is_local :boolean default("0")
|
|
# local_url :string(255)
|
|
# yaml :text(65535)
|
|
# sort_no :integer default("0")
|
|
# use_count :integer default("0")
|
|
# user_id :integer
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_action_nodes_on_action_types_id (action_node_types_id)
|
|
# index_action_nodes_on_user_id (user_id)
|
|
#
|
|
|
|
class Action::Node < ApplicationRecord
|
|
self.table_name = 'action_nodes'
|
|
default_scope { order(sort_no: :asc) }
|
|
|
|
has_many :action_node_inputs, :class_name => 'Action::NodeInput', foreign_key: "action_nodes_id"
|
|
has_many :action_node_selects, :class_name => 'Action::NodeSelect', foreign_key: "action_nodes_id"
|
|
belongs_to :action_node_type, :class_name => 'Action::NodeType', foreign_key: "action_node_types_id"
|
|
|
|
belongs_to :user, optional: true
|
|
|
|
|
|
# def content_yaml
|
|
# "foo".to_yaml
|
|
# <<~YAML
|
|
# - name: Set up JDK ${{ matrix.java }}
|
|
# uses: actions/setup-java@v3
|
|
# with:
|
|
# distribution: 'temurin'
|
|
# java-version: ${{ matrix.java }}
|
|
# YAML
|
|
# end
|
|
|
|
def yaml_hash
|
|
<<~YAML
|
|
name: Check dist
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
call-check-dist:
|
|
name: Check dist/
|
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
|
with:
|
|
node-version: '20.x'
|
|
YAML
|
|
end
|
|
end
|