diff --git a/angel_orm_generator/lib/src/orm_generator.dart b/angel_orm_generator/lib/src/orm_generator.dart index e6af4758..c8cf75f0 100644 --- a/angel_orm_generator/lib/src/orm_generator.dart +++ b/angel_orm_generator/lib/src/orm_generator.dart @@ -50,6 +50,16 @@ class OrmGenerator extends GeneratorForAnnotation { clazz ..name = '${rc.pascalCase}Orm' ..abstract = true; + + // Next, add method stubs. + // * getAll + // * getById + // * + })); + + // Create `FooQuery` class + lib.body.add(new Class((clazz) { + clazz..name = '${rc.pascalCase}Query'; })); }); } diff --git a/angel_orm_generator/test/models/author.orm.g.dart b/angel_orm_generator/test/models/author.orm.g.dart new file mode 100644 index 00000000..9345327a --- /dev/null +++ b/angel_orm_generator/test/models/author.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'author.dart'; + +abstract class AuthorOrm {} diff --git a/angel_orm_generator/test/models/book.orm.g.dart b/angel_orm_generator/test/models/book.orm.g.dart new file mode 100644 index 00000000..80e27846 --- /dev/null +++ b/angel_orm_generator/test/models/book.orm.g.dart @@ -0,0 +1,7 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +// Error: Cannot infer SQL column type for field "author" with type "Author". diff --git a/angel_orm_generator/test/models/car.orm.g.dart b/angel_orm_generator/test/models/car.orm.g.dart new file mode 100644 index 00000000..1f92c31a --- /dev/null +++ b/angel_orm_generator/test/models/car.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'car.dart'; + +abstract class CarOrm {} diff --git a/angel_orm_generator/test/models/customer.orm.g.dart b/angel_orm_generator/test/models/customer.orm.g.dart new file mode 100644 index 00000000..bf95ffc8 --- /dev/null +++ b/angel_orm_generator/test/models/customer.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'customer.dart'; + +abstract class CustomerOrm {} diff --git a/angel_orm_generator/test/models/foot.orm.g.dart b/angel_orm_generator/test/models/foot.orm.g.dart new file mode 100644 index 00000000..7c457b7f --- /dev/null +++ b/angel_orm_generator/test/models/foot.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'foot.dart'; + +abstract class FootOrm {} diff --git a/angel_orm_generator/test/models/fruit.orm.g.dart b/angel_orm_generator/test/models/fruit.orm.g.dart new file mode 100644 index 00000000..e943b687 --- /dev/null +++ b/angel_orm_generator/test/models/fruit.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'fruit.dart'; + +abstract class FruitOrm {} diff --git a/angel_orm_generator/test/models/leg.orm.g.dart b/angel_orm_generator/test/models/leg.orm.g.dart new file mode 100644 index 00000000..92e118f3 --- /dev/null +++ b/angel_orm_generator/test/models/leg.orm.g.dart @@ -0,0 +1,7 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +// Error: Cannot infer SQL column type for field "foot" with type "Foot". diff --git a/angel_orm_generator/test/models/order.orm.g.dart b/angel_orm_generator/test/models/order.orm.g.dart new file mode 100644 index 00000000..dcaa0afe --- /dev/null +++ b/angel_orm_generator/test/models/order.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'order.dart'; + +abstract class OrderOrm {} diff --git a/angel_orm_generator/test/models/role.orm.g.dart b/angel_orm_generator/test/models/role.orm.g.dart new file mode 100644 index 00000000..bf936571 --- /dev/null +++ b/angel_orm_generator/test/models/role.orm.g.dart @@ -0,0 +1,10 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +import 'dart:async'; +import 'role.dart'; + +abstract class RoleOrm {} diff --git a/angel_orm_generator/test/models/tree.orm.g.dart b/angel_orm_generator/test/models/tree.orm.g.dart new file mode 100644 index 00000000..61166847 --- /dev/null +++ b/angel_orm_generator/test/models/tree.orm.g.dart @@ -0,0 +1,7 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +// Error: Cannot infer SQL column type for field "fruits" with type "List". diff --git a/angel_orm_generator/test/models/user.orm.g.dart b/angel_orm_generator/test/models/user.orm.g.dart new file mode 100644 index 00000000..fd82a00f --- /dev/null +++ b/angel_orm_generator/test/models/user.orm.g.dart @@ -0,0 +1,7 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// OrmGenerator +// ************************************************************************** + +// Error: Cannot infer SQL column type for field "roles" with type "List".