Sha256: 4775594cbc69f4927c106b70ca506d1e078c4818d36ea3f2b91e5dea601db5fa

Contents?: true

Size: 726 Bytes

Versions: 12

Compression:

Stored size: 726 Bytes

Contents

##
## Only object_key, object_path, no validations.
##
class Office::EmailMessageStub
  include Mongoid::Document
  include Mongoid::Timestamps

  STATE_PENDING   = 'state_pending'
  STATE_PROCESSED = 'state_processed'
  STATES          = [ STATE_PENDING, STATE_PROCESSED ]
  field :state, type: :string, default: STATE_PENDING

  field :object_key,  type: :string ## aka 'filename', use with bucket name + prefix
  validates_presence_of :object_key

  field :object_path, type: :string ## A routable s3 url ## @TODO: remove this field. _vp_ 2023-03-07
  # validates_presence_of :object_path ## only need object_key == message_id

  field :wp_term_ids, type: :array, default: []

end
MsgStub = EMS = Office::EmailMessageStub

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ish_models-0.0.33.235 lib/office/email_message_stub.rb
ish_models-0.0.33.234 lib/office/email_message_stub.rb
ish_models-0.0.33.233 lib/office/email_message_stub.rb
ish_models-0.0.33.232 lib/office/email_message_stub.rb
ish_models-0.0.33.231 lib/office/email_message_stub.rb
ish_models-0.0.33.230 lib/office/email_message_stub.rb
ish_models-0.0.33.229 lib/office/email_message_stub.rb
ish_models-0.0.33.228 lib/office/email_message_stub.rb
ish_models-0.0.33.227 lib/office/email_message_stub.rb
ish_models-0.0.33.226 lib/office/email_message_stub.rb
ish_models-0.0.33.225 lib/office/email_message_stub.rb
ish_models-0.0.33.224 lib/office/email_message_stub.rb