Aitrainer_app 0.0.1
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
class Customer {
|
||||
String name;
|
||||
String email;
|
||||
String firstName;
|
||||
String sex;
|
||||
int age;
|
||||
String active;
|
||||
int customerId;
|
||||
|
||||
|
||||
Customer({this.customerId, this.name, this.firstName, this.email, this.sex, this.age, this.active});
|
||||
|
||||
Customer.fromJson(Map json) {
|
||||
this.customerId = json['customer_id'];
|
||||
this.name = json['name'];
|
||||
this.firstName = json['firstname'];
|
||||
this.email = json['email'];
|
||||
this.sex = json['sex'];
|
||||
this.age = json['age'];
|
||||
this.active = json['active'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
{
|
||||
"name": name,
|
||||
"firstName": firstName,
|
||||
"email": email,
|
||||
"age": age,
|
||||
"sex": sex,
|
||||
"active": 'Y'
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class Exercise {
|
||||
int exerciseId;
|
||||
int exerciseTypeId;
|
||||
int customerId;
|
||||
int quantity;
|
||||
DateTime datetimeExercise;
|
||||
|
||||
|
||||
|
||||
Exercise({this.exerciseTypeId, this.customerId, this.quantity, this.datetimeExercise});
|
||||
|
||||
Exercise.fromJson(Map json) {
|
||||
this.exerciseTypeId = json['exerciseTypeId'];
|
||||
this.customerId = json['customerId'];
|
||||
this.quantity = json['quantity'];
|
||||
this.datetimeExercise = json['datetimeExercise'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
{
|
||||
"exerciseTypeId": exerciseTypeId,
|
||||
"customerId": customerId,
|
||||
"quantity": quantity,
|
||||
|
||||
"datetimeExercise": DateFormat('yyyy-MM-dd HH:mm:ss').format(this.datetimeExercise),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class ExerciseType {
|
||||
int exerciseTypeId;
|
||||
String name;
|
||||
String description;
|
||||
BinaryCodec video;
|
||||
|
||||
ExerciseType({this.name, this.description});
|
||||
|
||||
ExerciseType.fromJson(Map json) {
|
||||
this.exerciseTypeId = json['exerciseTypeId'];
|
||||
this.name = json['name'];
|
||||
this.description = json['description'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
{
|
||||
"name": name,
|
||||
"description": description,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user