DVModel class
Annotation metadata for a Dartvel data model.
The generator adds serialization and model behavior to the annotated class; this annotation intentionally does not provide a fake runtime model.
Constructors
- DVModel({bool searchable = false, bool billable = false, int? nativePrice, DVModelPageDataMode pageDataMode = DVModelPageDataMode.auto, bool generatePublicPages = false, DVPublicPathsResolver? publicPathsResolver})
-
const
- DVModel.featuredImage()
-
Marks the field a generated model page uses as its featured image:
@DVModel.featuredImage().const - DVModel.hideFromPage()
-
Excludes the field from generated model pages:
@DVModel.hideFromPage().const - DVModel.mainContent()
-
Marks the field a generated model page renders as its main text content:
@DVModel.mainContent().const - DVModel.pageOrder(int order)
-
Sets where the field appears among a generated page's remaining fields:
@DVModel.pageOrder(3).const - DVModel.pageTitle()
-
Marks the field a generated model page uses as its title:
@DVModel.pageTitle().const - DVModel.searchableField()
-
Marks a model field for generated search indexing:
@DVModel.searchableField().const - DVModel.sensitiveField({bool encrypted = false, bool showInForms = false, bool showInAdmin = false})
-
Marks a model field as sensitive:
@DVModel.sensitiveField().const
Properties
- billable → bool
-
final
- encrypted → bool
-
Field-scoped metadata, set only by the named field constructors below.
final
- generatePublicPages → bool
-
Whether the generator emits public pages, and static paths for them
during static generation, from this model's published records.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- nativePrice → int?
-
final
- pageDataMode → DVModelPageDataMode
-
How generated
Model.Page(...)resolves its data by default.final - pageOrderIndex → int?
-
Where this field sits among a generated page's remaining fields, set by
@DVModel.pageOrder(n). Lower comes first.final - pageRole → DVModelPageRole?
-
The part this field plays in a generated model page, when one of the
page-composition field constructors set it.
final
- publicPathsResolver → DVPublicPathsResolver?
-
Supplies the path values static generation should render for this
model's parameterized route, when the default enumeration is not what is
wanted.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchable → bool
-
final
- showInAdmin → bool
-
final
- showInForms → bool
-
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