platform/angel_orm/lib/src/annotations.dart
2019-03-14 05:21:53 -04:00

27 lines
587 B
Dart

const Orm orm = const Orm();
class Orm {
/// The name of the table to query.
///
/// Inferred if not present.
final String tableName;
/// Whether to generate migrations for this model.
///
/// Defaults to [:true:].
final bool generateMigrations;
const Orm({this.tableName, this.generateMigrations: true});
}
@deprecated
class Join {
final Type against;
final String foreignKey;
final JoinType type;
const Join(this.against, this.foreignKey, {this.type: JoinType.inner});
}
/// The various types of [Join].
enum JoinType { inner, left, right, full, self }