Entity class

Entity annotation for marking a class as a database entity

The database type is determined from the @Db annotation's DbConfig. Do not specify dbType here - it will be inferred from the database configuration.

Example:

@Entity(tableName: 'users')
class UserEntity {
  @Id()
  int id;
  String name;
}

Constructors

Entity({String? tableName, String? description})
const

Properties

description String?
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited