Model class final

Maps an ordinary Dart class to a physical table.

table defaults to the class name without case conversion or pluralization. namespace overrides the PostgreSQL configuration default; it never changes the Dart class identity, query member name, or connection search path.

Optional plain, nongeneric mixins can share field annotations and business methods. Persistent mixin storage must be mutable and non-late, with constant initializers or implicit null. Map each field through a same-name, same-type named constructor parameter and a direct this.field = field assignment. Initializers are placeholders, not insert defaults. Generation rejects conflicting fields/accessors, repeated metadata, superclass storage and executable constructor logic beyond these assignments.

Constructors

Model({String? table, String? namespace})
Marks a class for static generation.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
namespace → String?
Explicit PostgreSQL namespace, independent of source paths.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
table → String?
Explicit physical table name.
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