Recurring

This commit is contained in:
Hillel Coren 2021-09-13 14:14:35 +03:00
parent 2e5f70bb8c
commit 0848a49925
2 changed files with 33 additions and 7 deletions

View File

@ -287,6 +287,10 @@ abstract class ExpenseEntity extends Object
String get number; String get number;
@nullable
@BuiltValueField(wireName: 'recurring_id')
String get recurringId;
@BuiltValueField(wireName: 'frequency_id') @BuiltValueField(wireName: 'frequency_id')
String get frequencyId; String get frequencyId;

View File

@ -278,6 +278,13 @@ class _$ExpenseEntitySerializer implements StructuredSerializer<ExpenseEntity> {
..add( ..add(
serializers.serialize(value, specifiedType: const FullType(bool))); serializers.serialize(value, specifiedType: const FullType(bool)));
} }
value = object.recurringId;
if (value != null) {
result
..add('recurring_id')
..add(serializers.serialize(value,
specifiedType: const FullType(String)));
}
value = object.isChanged; value = object.isChanged;
if (value != null) { if (value != null) {
result result
@ -474,6 +481,10 @@ class _$ExpenseEntitySerializer implements StructuredSerializer<ExpenseEntity> {
result.number = serializers.deserialize(value, result.number = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'recurring_id':
result.recurringId = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'frequency_id': case 'frequency_id':
result.frequencyId = serializers.deserialize(value, result.frequencyId = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
@ -843,6 +854,8 @@ class _$ExpenseEntity extends ExpenseEntity {
@override @override
final String number; final String number;
@override @override
final String recurringId;
@override
final String frequencyId; final String frequencyId;
@override @override
final String lastSentDate; final String lastSentDate;
@ -909,6 +922,7 @@ class _$ExpenseEntity extends ExpenseEntity {
this.calculateTaxByAmount, this.calculateTaxByAmount,
this.documents, this.documents,
this.number, this.number,
this.recurringId,
this.frequencyId, this.frequencyId,
this.lastSentDate, this.lastSentDate,
this.nextSendDate, this.nextSendDate,
@ -1044,6 +1058,7 @@ class _$ExpenseEntity extends ExpenseEntity {
calculateTaxByAmount == other.calculateTaxByAmount && calculateTaxByAmount == other.calculateTaxByAmount &&
documents == other.documents && documents == other.documents &&
number == other.number && number == other.number &&
recurringId == other.recurringId &&
frequencyId == other.frequencyId && frequencyId == other.frequencyId &&
lastSentDate == other.lastSentDate && lastSentDate == other.lastSentDate &&
nextSendDate == other.nextSendDate && nextSendDate == other.nextSendDate &&
@ -1080,13 +1095,13 @@ class _$ExpenseEntity extends ExpenseEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, privateNotes.hashCode), publicNotes.hashCode), shouldBeInvoiced.hashCode), invoiceDocuments.hashCode), transactionId.hashCode), transactionReference.hashCode), bankId.hashCode), currencyId.hashCode), categoryId.hashCode), amount.hashCode), date.hashCode), paymentDate.hashCode), exchangeRate.hashCode), invoiceCurrencyId.hashCode), paymentTypeId.hashCode), taxName1.hashCode), taxName2.hashCode), taxRate1.hashCode), taxRate2.hashCode), taxName3.hashCode), taxRate3.hashCode), clientId.hashCode), invoiceId.hashCode), vendorId.hashCode), projectId.hashCode), customValue1.hashCode), customValue2.hashCode), customValue3.hashCode), customValue4.hashCode), taxAmount1.hashCode), $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, privateNotes.hashCode), publicNotes.hashCode), shouldBeInvoiced.hashCode), invoiceDocuments.hashCode), transactionId.hashCode), transactionReference.hashCode), bankId.hashCode), currencyId.hashCode), categoryId.hashCode), amount.hashCode), date.hashCode), paymentDate.hashCode), exchangeRate.hashCode), invoiceCurrencyId.hashCode), paymentTypeId.hashCode), taxName1.hashCode), taxName2.hashCode), taxRate1.hashCode), taxRate2.hashCode), taxName3.hashCode), taxRate3.hashCode), clientId.hashCode), invoiceId.hashCode), vendorId.hashCode), projectId.hashCode), customValue1.hashCode), customValue2.hashCode), customValue3.hashCode), customValue4.hashCode), taxAmount1.hashCode), taxAmount2.hashCode),
taxAmount2.hashCode), taxAmount3.hashCode),
taxAmount3.hashCode), usesInclusiveTaxes.hashCode),
usesInclusiveTaxes.hashCode), calculateTaxByAmount.hashCode),
calculateTaxByAmount.hashCode), documents.hashCode),
documents.hashCode), number.hashCode),
number.hashCode), recurringId.hashCode),
frequencyId.hashCode), frequencyId.hashCode),
lastSentDate.hashCode), lastSentDate.hashCode),
nextSendDate.hashCode), nextSendDate.hashCode),
@ -1141,6 +1156,7 @@ class _$ExpenseEntity extends ExpenseEntity {
..add('calculateTaxByAmount', calculateTaxByAmount) ..add('calculateTaxByAmount', calculateTaxByAmount)
..add('documents', documents) ..add('documents', documents)
..add('number', number) ..add('number', number)
..add('recurringId', recurringId)
..add('frequencyId', frequencyId) ..add('frequencyId', frequencyId)
..add('lastSentDate', lastSentDate) ..add('lastSentDate', lastSentDate)
..add('nextSendDate', nextSendDate) ..add('nextSendDate', nextSendDate)
@ -1316,6 +1332,10 @@ class ExpenseEntityBuilder
String get number => _$this._number; String get number => _$this._number;
set number(String number) => _$this._number = number; set number(String number) => _$this._number = number;
String _recurringId;
String get recurringId => _$this._recurringId;
set recurringId(String recurringId) => _$this._recurringId = recurringId;
String _frequencyId; String _frequencyId;
String get frequencyId => _$this._frequencyId; String get frequencyId => _$this._frequencyId;
set frequencyId(String frequencyId) => _$this._frequencyId = frequencyId; set frequencyId(String frequencyId) => _$this._frequencyId = frequencyId;
@ -1414,6 +1434,7 @@ class ExpenseEntityBuilder
_calculateTaxByAmount = $v.calculateTaxByAmount; _calculateTaxByAmount = $v.calculateTaxByAmount;
_documents = $v.documents.toBuilder(); _documents = $v.documents.toBuilder();
_number = $v.number; _number = $v.number;
_recurringId = $v.recurringId;
_frequencyId = $v.frequencyId; _frequencyId = $v.frequencyId;
_lastSentDate = $v.lastSentDate; _lastSentDate = $v.lastSentDate;
_nextSendDate = $v.nextSendDate; _nextSendDate = $v.nextSendDate;
@ -1492,6 +1513,7 @@ class ExpenseEntityBuilder
calculateTaxByAmount: calculateTaxByAmount, calculateTaxByAmount: calculateTaxByAmount,
documents: documents.build(), documents: documents.build(),
number: BuiltValueNullFieldError.checkNotNull(number, 'ExpenseEntity', 'number'), number: BuiltValueNullFieldError.checkNotNull(number, 'ExpenseEntity', 'number'),
recurringId: recurringId,
frequencyId: BuiltValueNullFieldError.checkNotNull(frequencyId, 'ExpenseEntity', 'frequencyId'), frequencyId: BuiltValueNullFieldError.checkNotNull(frequencyId, 'ExpenseEntity', 'frequencyId'),
lastSentDate: BuiltValueNullFieldError.checkNotNull(lastSentDate, 'ExpenseEntity', 'lastSentDate'), lastSentDate: BuiltValueNullFieldError.checkNotNull(lastSentDate, 'ExpenseEntity', 'lastSentDate'),
nextSendDate: BuiltValueNullFieldError.checkNotNull(nextSendDate, 'ExpenseEntity', 'nextSendDate'), nextSendDate: BuiltValueNullFieldError.checkNotNull(nextSendDate, 'ExpenseEntity', 'nextSendDate'),