Ember temp commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
attr = DS.attr
|
||||
Qsupplier.App.List = DS.Model.extend
|
||||
state: attr 'string'
|
||||
needs_help: attr 'boolean'
|
||||
needs_payment: attr 'boolean'
|
||||
is_paid: attr 'boolean'
|
||||
has_active_orders: attr 'boolean'
|
||||
price: attr 'number'
|
||||
table_number: attr 'number'
|
||||
table: DS.belongsTo('Qsupplier.App.Table', inverse: 'active_list')
|
||||
orders: DS.hasMany('Qsupplier.App.Order')
|
||||
@@ -0,0 +1,9 @@
|
||||
attr = DS.attr
|
||||
Qsupplier.App.Order = DS.Model.extend
|
||||
state: attr('string')
|
||||
list: DS.belongsTo('Qsupplier.App.List')
|
||||
total_amount: attr('number')
|
||||
#products: attr('object')
|
||||
products: DS.hasMany('Qsupplier.App.Product')
|
||||
active: (-> @get('state') == 'active').property('state')
|
||||
delivered: (-> @get('state') == 'delivered').property('state')
|
||||
@@ -0,0 +1,3 @@
|
||||
attr = DS.attr
|
||||
Qsupplier.App.Product = DS.Model.extend
|
||||
order: DS.belongsTo('Qsupplier.App.Order')
|
||||
@@ -0,0 +1,6 @@
|
||||
attr = DS.attr
|
||||
Qsupplier.App.Section = DS.Model.extend
|
||||
title: attr 'string'
|
||||
width: attr 'number'
|
||||
height: attr 'number'
|
||||
tables: DS.hasMany('Qsupplier.App.Table')
|
||||
@@ -0,0 +1,10 @@
|
||||
attr = DS.attr
|
||||
Qsupplier.App.Table = DS.Model.extend
|
||||
number: attr 'number'
|
||||
width: attr 'number'
|
||||
height: attr 'number'
|
||||
position_x: attr 'number'
|
||||
position_y: attr 'number'
|
||||
occupied: attr 'boolean'
|
||||
section: DS.belongsTo('Qsupplier.App.Section')
|
||||
active_list: DS.belongsTo('Qsupplier.App.List')
|
||||
Reference in New Issue
Block a user