platform/angel_orm/lib/src/annotations.dart

26 lines
419 B
Dart
Raw Normal View History

2018-08-24 14:17:12 +00:00
const Orm orm = const Orm();
2017-12-07 08:21:49 +00:00
2018-08-24 14:17:12 +00:00
class Orm {
2018-08-24 12:30:38 +00:00
final String tableName;
2018-08-24 14:17:12 +00:00
const Orm({this.tableName});
}
enum OrmType {
mongoDB,
rethinkDB,
mySql,
postgreSql,
2017-06-18 04:19:05 +00:00
}
2018-08-24 12:30:38 +00:00
class CanJoin {
2017-12-07 08:21:49 +00:00
final Type type;
2018-08-24 12:30:38 +00:00
final String foreignKey;
final JoinType joinType;
2018-08-24 12:30:38 +00:00
const CanJoin(this.type, this.foreignKey, {this.joinType: JoinType.full});
}
/// The various types of [Join].
enum JoinType { join, left, right, full, self }