Skip to content

[Feature Request] Use Enum field type in JSON type #1834

@onimitch

Description

@onimitch

Is your feature request related to a problem? Please describe.
I'd like to be able to do this (or a similar alternative solution):

enum TagType {
    One
    Two
    Three
}

type TestData {
    tag     TagType?
    eventId String?
}

model Test {
    id   String   @id @default(cuid())
    data TestData @json
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions