mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com> Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: tds-1 <tanmay@qoala.id> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
13 lines
253 B
Ruby
13 lines
253 B
Ruby
class TestData::DisplayIdTracker
|
|
attr_reader :current
|
|
|
|
def initialize(account:)
|
|
max_display_id = Conversation.where(account_id: account.id).maximum(:display_id) || 0
|
|
@current = max_display_id
|
|
end
|
|
|
|
def next_id
|
|
@current += 1
|
|
end
|
|
end
|