Skip to content

Commit

Permalink
Merge pull request #7 from mindnervestech/mnt-model-fix
Browse files Browse the repository at this point in the history
Fix all entitiy models and static models
  • Loading branch information
hillelcoren committed Jun 22, 2018
2 parents 366e8f3 + fa22d9b commit 3b98553
Show file tree
Hide file tree
Showing 44 changed files with 1,795 additions and 1,935 deletions.
97 changes: 52 additions & 45 deletions lib/data/models/client_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,145 +43,148 @@ abstract class ClientEntity extends Object with BaseEntity implements Built<Clie
factory ClientEntity() {
return _$ClientEntity._(
id: --ClientEntity.counter,
name: '',
displayName: '',
balance: 0.0,
paidToDate: 0.0,
address1: '',
address2: '',
city: '',
state: '',
postalCode: '',
countryId: 0,
workPhone: '',
privateNotes: '',
publicNotes: '',
website: '',
industryId: 0,
sizeId: 0,
paymentTerms: 0,
vatNumber: '',
idNumber: '',
languageId: 0,
currencyId: 0,
invoiceNumberCounter: 0,
quoteNumberCounter: 0,
taskRate: 0.0,
shippingAddress1: '',
shippingAddress2: '',
shippingCity: '',
shippingState: '',
shippingPostalCode: '',
shippingCountryId: 0,
showTasksInPortal: false,
sendReminders: false,
creditNumberCounter: 0,
customValue1: '',
customValue2: '',
contacts: BuiltList<ContactEntity>(),

updatedAt: 0,
archivedAt: 0,
isDeleted: false,
);
}

@nullable
@BuiltValueField(wireName: 'name')
String get name;

@nullable
@BuiltValueField(wireName: 'display_name')
String get displayName;

@nullable
double get balance;

@nullable
@BuiltValueField(wireName: 'paid_to_date')
double get paidToDate;

@nullable
String get address1;

@nullable
String get address2;

@nullable
String get city;

@nullable
String get state;

@nullable
@BuiltValueField(wireName: 'postal_code')
String get postalCode;

@nullable
@BuiltValueField(wireName: 'country_id')
int get countryId;

@nullable
@BuiltValueField(wireName: 'work_phone')
String get workPhone;

@nullable
@BuiltValueField(wireName: 'private_notes')
String get privateNotes;

@nullable
@BuiltValueField(wireName: 'public_notes')
String get publicNotes;

@nullable
String get website;

@nullable
@BuiltValueField(wireName: 'industry_id')
int get industryId;

@nullable
@BuiltValueField(wireName: 'size_id')
int get sizeId;

@nullable
@BuiltValueField(wireName: 'payment_terms')
int get paymentTerms;

@nullable
@BuiltValueField(wireName: 'vat_number')
String get vatNumber;

@nullable
@BuiltValueField(wireName: 'id_number')
String get idNumber;

@nullable
@BuiltValueField(wireName: 'language_id')
int get languageId;

@nullable
@BuiltValueField(wireName: 'currency_id')
int get currencyId;

@nullable
@BuiltValueField(wireName: 'invoice_number_counter')
int get invoiceNumberCounter;

@nullable
@BuiltValueField(wireName: 'quote_number_counter')
int get quoteNumberCounter;

@nullable
@BuiltValueField(wireName: 'task_rate')
double get taskRate;

@nullable
@BuiltValueField(wireName: 'shipping_address1')
String get shippingAddress1;

@nullable
@BuiltValueField(wireName: 'shipping_address2')
String get shippingAddress2;

@nullable
@BuiltValueField(wireName: 'shipping_city')
String get shippingCity;

@nullable
@BuiltValueField(wireName: 'shipping_state')
String get shippingState;

@nullable
@BuiltValueField(wireName: 'shipping_postal_code')
String get shippingPostalCode;

@nullable
@BuiltValueField(wireName: 'shipping_country_id')
int get shippingCountryId;

@nullable
@BuiltValueField(wireName: 'show_tasks_in_portal')
bool get showTasksInPortal;

@nullable
@BuiltValueField(wireName: 'send_reminders')
bool get sendReminders;

@nullable
@BuiltValueField(wireName: 'credit_number_counter')
int get creditNumberCounter;

@nullable
@BuiltValueField(wireName: 'custom_value1')
String get customValue1;

@nullable
@BuiltValueField(wireName: 'custom_value2')
String get customValue2;

@nullable
BuiltList<ContactEntity> get contacts;

//String get last_login;
Expand Down Expand Up @@ -298,37 +301,41 @@ abstract class ContactEntity extends Object with BaseEntity implements Built<Con
static int counter = 0;
factory ContactEntity() {
return _$ContactEntity._(
id: --ContactEntity.counter
id: --ContactEntity.counter,
firstName: '',
lastName: '',
email: '',
phone: '',
contactKey: '',
isPrimary: false,
customValue1: '',
customValue2: '',

updatedAt: 0,
archivedAt: 0,
isDeleted: false,
);
}

@nullable
@BuiltValueField(wireName: 'first_name')
String get firstName;

@nullable
@BuiltValueField(wireName: 'last_name')
String get lastName;

@nullable
String get email;

@nullable
String get phone;

@nullable
@BuiltValueField(wireName: 'contact_key')
String get contactKey;

@nullable
@BuiltValueField(wireName: 'is_primary')
bool get isPrimary;

@nullable
@BuiltValueField(wireName: 'custom_value1')
String get customValue1;

@nullable
@BuiltValueField(wireName: 'custom_value2')
String get customValue2;

Expand Down
Loading

0 comments on commit 3b98553

Please sign in to comment.