Document constructor
- @JsonSerializable.new(explicitToJson: true)
- @Default.new('') String id,
- @Default.new('') String name,
- @Default.new('') String type,
- @Default.new('') String url,
- @Default.new(0) int width,
- @Default.new(0) int height,
- @Default.new(0) int size,
- @Default.new('') String preview,
- @Default.new('') String disk,
- @Default.new('') String hash,
- @Default.new('') @JsonKey.new(name: 'user_id') String createdById,
- @Default.new('') @JsonKey.new(name: 'assigned_user_id') String assignedToId,
- @Default.new(0) @JsonKey.new(name: 'created_at') int createdAt,
- @Default.new(0) @JsonKey.new(name: 'updated_at') int updatedAt,
- @Default.new(0) @JsonKey.new(name: 'archived_at') int archivedAt,
- @Default.new(false) @JsonKey.new(name: 'is_deleted') bool isDeleted,
- @Default.new(false) @JsonKey.new(name: 'is_default') bool isDefault,
Document factory constructor
Implementation
@JsonSerializable(explicitToJson: true)
factory Document({
@Default('') String id,
@Default('') String name,
@Default('') String type,
@Default('') String url,
@Default(0) int width,
@Default(0) int height,
@Default(0) int size,
@Default('') String preview,
@Default('') String disk,
@Default('') String hash,
@Default('') @JsonKey(name: 'user_id') String createdById,
@Default('') @JsonKey(name: 'assigned_user_id') String assignedToId,
@Default(0) @JsonKey(name: 'created_at') int createdAt,
@Default(0) @JsonKey(name: 'updated_at') int updatedAt,
@Default(0) @JsonKey(name: 'archived_at') int archivedAt,
@Default(false) @JsonKey(name: 'is_deleted') bool isDeleted,
@Default(false) @JsonKey(name: 'is_default') bool isDefault,
}) = _Document;