An EntityDef represents the information that persistent knows
about an Entity. It uses this information to generate the Haskell
datatype, the SQL migrations, and other relevant conversions.
Constructors
EntityDefentityHaskell :: !EntityNameHSThe name of the entity as Haskell understands it.
entityDB :: !EntityNameDBThe name of the database table corresponding to the entity.
entityId :: !EntityIdDefThe entity's primary key or identifier.
entityAttrs :: ![Attr]The
persistententity syntax allows you to add arbitrary Attrs to an entity using the!operator. Those attributes are stored in this list.entityFields :: ![FieldDef]The fields for this entity. Note that the ID field will not be present in this list. To get all of the fields for an entity, use keyAndEntityFields.
entityUniques :: ![UniqueDef]The Uniqueness constraints for this entity.
entityForeigns :: ![ForeignDef]The foreign key relationships that this entity has to other entities.
entityDerives :: ![Text]A list of type classes that have been derived for this entity.
entityExtra :: !Map Text [ExtraLine]entitySum :: !BoolWhether or not this entity represents a sum type in the database.
entityComments :: !Maybe TextOptional comments on the entity.
Instances5Eq, Ord, Read, Show, Lift
Eq EntityDefDefined in persistent-2.14.6.3 · Database.Persist.Types.BaseOrd EntityDefDefined in persistent-2.14.6.3 · Database.Persist.Types.BaseRead EntityDefDefined in persistent-2.14.6.3 · Database.Persist.Types.BaseShow EntityDefDefined in persistent-2.14.6.3 · Database.Persist.Types.BaseLift EntityDefDefined in persistent-2.14.6.3 · Database.Persist.Types.Base