Class: CommandTower::Messaging::InboxItem
Constant Summary
collapse
- STATUS_CREATED =
"created"
- STATUS_VIEWED =
"viewed"
- STATUS_ARCHIVED =
"archived"
- STATUS_DELETED =
"deleted"
Instance Method Summary
collapse
attribute_to_type_mapping
Instance Method Details
#archived? ⇒ Boolean
30
31
32
|
# File 'app/models/command_tower/messaging/inbox_item.rb', line 30
def archived?
archived_at.present?
end
|
#deleted? ⇒ Boolean
34
35
36
|
# File 'app/models/command_tower/messaging/inbox_item.rb', line 34
def deleted?
deleted_at.present?
end
|
#lifecycle_label ⇒ Object
Denormalized label helper — timestamps remain authoritative for filters.
#unread? ⇒ Boolean
38
39
40
|
# File 'app/models/command_tower/messaging/inbox_item.rb', line 38
def unread?
!viewed? && !archived? && !deleted?
end
|
#viewed? ⇒ Boolean
26
27
28
|
# File 'app/models/command_tower/messaging/inbox_item.rb', line 26
def viewed?
viewed_at.present?
end
|