18
This commit is contained in:
parent
6e2030fdf4
commit
a3ee18e8c9
2 changed files with 3 additions and 5 deletions
|
@ -113,7 +113,6 @@ class ${name}Service extends Service {
|
||||||
await file.writeAsString('''
|
await file.writeAsString('''
|
||||||
library angel.models.$lower;
|
library angel.models.$lower;
|
||||||
|
|
||||||
import 'dart:convert';
|
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel_framework/angel_framework.dart';
|
||||||
import 'package:source_gen/generators/json_serializable.dart';
|
import 'package:source_gen/generators/json_serializable.dart';
|
||||||
|
|
||||||
|
@ -131,7 +130,7 @@ class $name extends MemoryModel with _\$${name}SerializerMixin {
|
||||||
@JsonKey('desc')
|
@JsonKey('desc')
|
||||||
String desc;
|
String desc;
|
||||||
|
|
||||||
factory $name.fromJson(Map json) => _\$${name}fromJson(json);
|
factory $name.fromJson(Map json) => _\$${name}FromJson(json);
|
||||||
|
|
||||||
$name({String id, this.name, this.desc}) {
|
$name({String id, this.name, this.desc}) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -168,7 +167,6 @@ class ${name}Service extends MemoryService<$name> {
|
||||||
await file.writeAsString('''
|
await file.writeAsString('''
|
||||||
library angel.models.$lower;
|
library angel.models.$lower;
|
||||||
|
|
||||||
import 'dart:convert';
|
|
||||||
import 'package:angel_mongo/model.dart';
|
import 'package:angel_mongo/model.dart';
|
||||||
import 'package:source_gen/generators/json_serializable.dart';
|
import 'package:source_gen/generators/json_serializable.dart';
|
||||||
|
|
||||||
|
@ -186,7 +184,7 @@ class $name extends Model with _\$${name}SerializerMixin {
|
||||||
@JsonKey('desc')
|
@JsonKey('desc')
|
||||||
String desc;
|
String desc;
|
||||||
|
|
||||||
factory $name.fromJson(Map json) => _\$${name}fromJson(json);
|
factory $name.fromJson(Map json) => _\$${name}FromJson(json);
|
||||||
|
|
||||||
$name({String id, this.name, this.desc}) {
|
$name({String id, this.name, this.desc}) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_cli
|
name: angel_cli
|
||||||
version: 1.0.0-dev+17
|
version: 1.0.0-dev+18
|
||||||
description: Command-line tools for the Angel framework.
|
description: Command-line tools for the Angel framework.
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=1.19.0"
|
sdk: ">=1.19.0"
|
||||||
|
|
Loading…
Reference in a new issue