I have this enum:

```
enum DealStatus:String {
    case PENDING = "Pending"
    case ACTIVE = "Active"
    case STOP = "Stop"
    case DECLINED = "Declined"
    case PAUSED = "Paused"
}

```

and struct:

```
struct ActiveDeals: Decodable {
    let keyword:            String
    let bookingType:        String
    let expiryDate:         Int
    let createdAt:          Int?
    let shopLocation:       String?
    let dealImages:         [DealImages]?
    let dealStatus:         String?
    let startingDate:       Int?
}

```

In struct I am trying to assign enum as type for `dealStatus` like this:

```
struct ActiveDeals: Decodable {
        let keyword:            String
        let bookingType:        String
        let expiryDate:         Int
        let createdAt:          Int?
        let shopLocation:       String?
        let dealImages:         [DealImages]?
        let dealStatus:         DealStatus
        let startingDate:       Int?
    }

```

But I am getting some compiler error:

> 
> Type 'ActiveDeals' does not conform to protocol 'Decodable'
> 
> 
> Protocol requires initializer 'init(from:)' with type 'Decodable'
> (Swift.Decodable)
> 
> 
> Cannot automatically synthesize 'Decodable'
> because 'DealStatus' does not conform to 'Decodable'
> 
> 
>