platform/angel_orm_generator/test/models/foot.g.dart

110 lines
2.6 KiB
Dart
Raw Normal View History

2018-08-24 13:42:09 +00:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of angel_orm_generator.test.models.foot;
2018-12-01 19:03:43 +00:00
// **************************************************************************
// OrmGenerator
// **************************************************************************
class FootQuery extends Query<Foot, FootQueryWhere> {
@override
final FootQueryWhere where = new FootQueryWhere();
@override
get tableName {
return 'foots';
}
@override
get fields {
return const ['id', 'legId', 'nToes', 'createdAt', 'updatedAt'];
}
@override
deserialize(List row) {
return new Foot(
id: (row[0] as String),
legId: (row[0] as int),
nToes: (row[0] as int),
createdAt: (row[0] as DateTime),
updatedAt: (row[0] as DateTime));
}
}
class FootQueryWhere extends QueryWhere {
final StringSqlExpressionBuilder id = new StringSqlExpressionBuilder('id');
final NumericSqlExpressionBuilder<int> legId =
new NumericSqlExpressionBuilder<int>('leg_id');
final NumericSqlExpressionBuilder<int> nToes =
new NumericSqlExpressionBuilder<int>('n_toes');
final DateTimeSqlExpressionBuilder createdAt =
new DateTimeSqlExpressionBuilder('created_at');
final DateTimeSqlExpressionBuilder updatedAt =
new DateTimeSqlExpressionBuilder('updated_at');
@override
get expressionBuilders {
return [id, legId, nToes, createdAt, updatedAt];
}
}
2018-08-24 13:42:09 +00:00
// **************************************************************************
// JsonModelGenerator
// **************************************************************************
@generatedSerializable
class Foot extends _Foot {
Foot({this.id, this.legId, this.nToes, this.createdAt, this.updatedAt});
@override
final String id;
@override
final int legId;
@override
final int nToes;
@override
final DateTime createdAt;
@override
final DateTime updatedAt;
Foot copyWith(
{String id,
int legId,
int nToes,
DateTime createdAt,
DateTime updatedAt}) {
return new Foot(
id: id ?? this.id,
legId: legId ?? this.legId,
nToes: nToes ?? this.nToes,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt);
}
bool operator ==(other) {
return other is _Foot &&
other.id == id &&
other.legId == legId &&
other.nToes == nToes &&
other.createdAt == createdAt &&
other.updatedAt == updatedAt;
}
2018-12-01 19:03:43 +00:00
@override
int get hashCode {
return hashObjects([id, legId, nToes, createdAt, updatedAt]);
}
2018-08-24 13:42:09 +00:00
Map<String, dynamic> toJson() {
return FootSerializer.toMap(this);
}
}