Attachment class abstract

An abstract class representing an attachment model.

The Attachment class defines the structure and fields for an attachment, which can be a file or a link, along with associated metadata such as description, creator information, and timestamps. It extends the JsonModel class to facilitate JSON serialization and deserialization.

Inheritance

Constructors

Attachment()

Properties

appUser JsonObject<AppUser>
The user who created the attachment.
getter/setter pair
appUserId JsonInteger
The unique identifier of the user who created the attachment.
getter/setter pair
createdAt JsonDate
The timestamp indicating when the attachment was created.
getter/setter pair
description JsonString
A brief description of the attachment.
getter/setter pair
error String?
Returns the first general error message, or null if there are no errors.
no setterinherited
errors Map<String, String?>
A map of field-specific error messages, keyed by field name.
getter/setter pairinherited
fields List<JsonField>
A list of all JSON fields included in the attachment model.
no setteroverride
file JsonObject<File>
The file associated with the attachment.
getter/setter pair
fileId JsonInteger
The unique identifier of the associated file, if any.
getter/setter pair
generalErrors List<String>
A list of general error messages that apply to the entire model.
getter/setter pairinherited
generalInformations List<String>
A list of general informational messages about the model.
getter/setter pairinherited
generalWarnings List<String>
A list of general warning messages that apply to the entire model.
getter/setter pairinherited
hasError bool
Returns true if the model has any field-specific or general errors.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasInformation bool
Returns true if the model has any field-specific or general informational messages.
no setterinherited
hasWarning bool
Returns true if the model has any field-specific or general warnings.
no setterinherited
id JsonInteger
The unique identifier of the attachment.
getter/setter pair
image JsonObject<Image>
The image associated with the attachment.
getter/setter pair
imageId JsonInteger
The unique identifier of the image associated with the attachment, if any.
getter/setter pair
information String?
Returns the first general informational message, or null if there are none.
no setterinherited
informations Map<String, String?>
A map of field-specific informational messages, keyed by field name.
getter/setter pairinherited
isFile JsonBoolean
Indicates whether the attachment is a file.
getter/setter pair
The URL or link associated with the attachment, if any.
getter/setter pair
name JsonString
The name of the attachment.
getter/setter pair
path JsonString
The file path of the attachment, if any.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedAt JsonDate
The timestamp indicating the last time the attachment was updated.
getter/setter pair
warning String?
Returns the first general warning message, or null if there are no warnings.
no setterinherited
warnings Map<String, String?>
A map of field-specific warning messages, keyed by field name.
getter/setter pairinherited

Methods

fromJson(dynamic json) → void
Deserializes JSON data into this model instance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setFile(File file) → void
toJson() Map<String, dynamic>
Serializes this model instance to a JSON map.
inherited
toString() String
Returns a JSON string representation of this model.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) → dynamic
Retrieves the value of a field by its name using bracket notation.
inherited
operator []=(String name, dynamic value) → void
Sets the value of a field by its name using bracket notation.
inherited