2018-05-04 03:51:17 +00:00
|
|
|
import 'package:angel_model/angel_model.dart';
|
|
|
|
import 'package:angel_orm/angel_orm.dart';
|
|
|
|
|
2018-08-24 12:30:38 +00:00
|
|
|
main() {
|
|
|
|
|
2018-05-04 03:51:17 +00:00
|
|
|
}
|
|
|
|
|
2018-08-24 14:19:39 +00:00
|
|
|
@postgreSqlOrm
|
2018-08-24 12:30:38 +00:00
|
|
|
abstract class Company extends Model {
|
|
|
|
String get name;
|
|
|
|
|
|
|
|
bool get isFortune500;
|
2018-05-04 03:51:17 +00:00
|
|
|
}
|
|
|
|
|
2018-08-24 14:19:39 +00:00
|
|
|
@postgreSqlOrm
|
2018-08-24 12:30:38 +00:00
|
|
|
abstract class _Employee extends Model {
|
2018-05-04 03:51:17 +00:00
|
|
|
@belongsTo
|
2018-08-24 12:30:38 +00:00
|
|
|
Company get company;
|
|
|
|
|
|
|
|
String get firstName;
|
2018-05-04 03:51:17 +00:00
|
|
|
|
2018-08-24 12:30:38 +00:00
|
|
|
String get lastName;
|
2018-05-04 03:51:17 +00:00
|
|
|
|
2018-08-24 12:30:38 +00:00
|
|
|
double get salary;
|
2018-05-04 03:51:17 +00:00
|
|
|
|
|
|
|
bool get isFortune500Employee => company.isFortune500;
|
|
|
|
}
|