mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-04 21:15:19 +02:00
Domain model sketch
This commit is contained in:
parent
02bfa9f251
commit
b2d8da8857
2 changed files with 53 additions and 0 deletions
25
db/migrate/20250225135843_add_rules.rb
Normal file
25
db/migrate/20250225135843_add_rules.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
class AddRules < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :rules, id: :uuid do |t|
|
||||
t.references :family, null: false, foreign_key: true, type: :uuid
|
||||
|
||||
t.date :effective_date, null: false
|
||||
t.boolean :active, null: false, default: true
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
create_table :rule_triggers do |t|
|
||||
t.references :rule, null: false, foreign_key: true, type: :uuid
|
||||
|
||||
t.string :trigger_type, null: false
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
create_table :rule_actions do |t|
|
||||
t.references :rule, null: false, foreign_key: true, type: :uuid
|
||||
|
||||
t.string :action_type, null: false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue