// Cost class

'use strict';

var memoize          = require('memoizee/plain')
  , defineCurrency   = require('dbjs-ext/number/currency')
  , defineStringLine = require('dbjs-ext/string/string-line');

module.exports = memoize(function (db) {
	var StringLine = defineStringLine(db)
	  , Currency = defineCurrency(db);

	return db.Object.extend('Cost', {
		// Cost label
		label: { type: StringLine },
		// Cost amount
		amount: { type: Currency, step: 1 },
		// Whether cost have been paid
		isPaid: { type: db.Boolean, value: false },
		// Whether payment is made online
		isElectronic: { type: db.Boolean, value: false }
	});
}, { normalizer: require('memoizee/normalizers/get-1')() });

@@ -390,24 +390,72 @@
 ringLine %7D,%0A
+%09%09// Cost label%0A%09%09legend: %7B type: StringLine %7D,%0A
 %09%09// Cost am

Add legend property for cost