Add models

This commit is contained in:
Norore 2024-06-08 21:27:11 +02:00
parent 28ddfa2f57
commit 12c7dbebe2
6 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,2 @@
class LettersController < ApplicationController
end

View file

@ -0,0 +1,2 @@
class SignatoriesController < ApplicationController
end

3
app/models/letter.rb Normal file
View file

@ -0,0 +1,3 @@
class Letter < ApplicationRecord
has_one_attached :document
end

2
app/models/signatory.rb Normal file
View file

@ -0,0 +1,2 @@
class Signatory < ApplicationRecord
end

View file

@ -0,0 +1,12 @@
class CreateLetters < ActiveRecord::Migration[7.1]
def change
create_table :letters do |t|
t.string :title
t.string :author
t.string :email
t.boolean :private_email
t.timestamps
end
end
end

View file

@ -0,0 +1,12 @@
class CreateSignatories < ActiveRecord::Migration[7.1]
def change
create_table :signatories do |t|
t.string :name
t.string :profession
t.string :email
t.boolean :private_email
t.timestamps
end
end
end