Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Model #84

Closed
olibrian opened this issue Jan 11, 2021 · 1 comment
Closed

Message Model #84

olibrian opened this issue Jan 11, 2021 · 1 comment
Assignees

Comments

@olibrian
Copy link
Member

htbt-msgs
(Maillog unten links sollte eigentlich MailingList heissen)

Originally posted by @psunix in #34 (comment)

@amaierhofer
Copy link
Contributor

amaierhofer commented Jan 11, 2021

Leichte Anpassung am Model, neues Model MessageDispatch

  • Message (STI Model) für Brief, Brief mit Rechnung, Sms, MailLog
  • MessageDispatch (Versand), Anzahl Empfänger, Begin / Ende vom Versand
  • MessageReciept (Empfangsbestätigung) Message wurde an Persons ausgeliefert
    create_table :messages do |t|
      t.belongs_to :source, polymorphic: true

      t.string :type, null: false
      t.string :subject, null: false, limit: 1024

      t.timestamps
    end

    create_table :message_dispatches do |t|
      t.belongs_to :message, null: false
      t.string :state, default: :pending
      t.integer :recipient_count, default: 0
      t.integer :success_count, default: 0
      t.integer :failed_count, default: 0
      t.timestamp :started_at
      t.timestamp :finished_at
    end

    create_table :message_reciepts do |t|
      t.belongs_to :message_dispatch, null: false
      t.belongs_to :person, null: false
      t.timestamp :created_at
      t.text :dispatch_error
    end

amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 11, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 11, 2021
@amaierhofer amaierhofer self-assigned this Jan 11, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
@olibrian olibrian mentioned this issue Jan 12, 2021
29 tasks
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 12, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 13, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 13, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 13, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 18, 2021
amaierhofer added a commit to hitobito/hitobito that referenced this issue Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants