---
title: Schema.Attribute
framework: swiftdata
role: symbol
role_heading: Class
path: swiftdata/schema/attribute
---

# Schema.Attribute

An object that describes the configuration and behavior of a specific property of a model class.

## Declaration

```swift
class Attribute
```

## Topics

### Creating an attribute

- [init(_:originalName:hashModifier:)](swiftdata/schema/attribute/init(_:originalname:hashmodifier:).md)
- [init(name:originalName:options:valueType:defaultValue:hashModifier:)](swiftdata/schema/attribute/init(name:originalname:options:valuetype:defaultvalue:hashmodifier:).md)

### Specifying value information

- [defaultValue](swiftdata/schema/attribute/defaultvalue.md)

### Determining behavior

- [options](swiftdata/schema/attribute/options.md)
- [isTransformable](swiftdata/schema/attribute/istransformable.md)

### Versioning

- [hashModifier](swiftdata/schema/attribute/hashmodifier.md)

### Structures

- [Schema.Attribute.Option](swiftdata/schema/attribute/option.md)

### Instance Properties

- [isCodable](swiftdata/schema/attribute/iscodable.md)

## Relationships

### Inherited By

- [Schema.CompositeAttribute](swiftdata/schema/compositeattribute.md)

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [SchemaProperty](swiftdata/schemaproperty.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Attributes

- [Schema.CompositeAttribute](swiftdata/schema/compositeattribute.md)
