# SchemaField

`import { SchemaField } from "destack:schema";`

Schema field.

```ds title="SchemaField"
export struct SchemaField {
    key: StaticKey;
    schema: Schema<unknown>;
    isOptional: boolean;
    isReadonly: boolean;
    attributes: [Attribute];
    constraints: [Constraint<unknown>];
}
```

[language/library/src/schema/schema.ds:78:96](https://github.com/destack-sh/destack/blob/main/language/library/src/schema/schema.ds#L78-L96)

## Members

### `key: StaticKey`

Field key.

### `schema: Schema<unknown>`

Field schema.

### `isOptional: boolean`

Whether the field is optional.

### `isReadonly: boolean`

Whether the field is readonly.

### `attributes: [Attribute]`

Field attributes.

### `constraints: [Constraint<unknown>]`

Field constraints.
