I'm trying to figure out the best approach to my Ember App.
I'm working with two models: events and bookings, and in my database, I structured they totally separate and independent from each other.
Schemas:
Events:
attributes:
date : Date
description : String
hiw : Object
hour : Date
meeting : String
men : Number
name : String
women : Number
createdAt : Date
updatedAt : Date
isActive :
type : Boolean
default : false
type:
type : String
default : 'event'
Bookings:
attributes:
email : String
idiom : String
name : String
obs : String
participants : Number
phone : String
sex : String
vip : String
createdAt : Date
updatedAt : Date
isActive :
type : Boolean
default : false
type:
type : String
default : 'booking'
As I'm learning Ember, I discovered that ember has relationships (belongsTo and hasMany), and I would ask if I should restructure schemas to deal with Ember, or if I should make them independent as i'm doing.
The tendency of bookings is be progressively more complex over time..
The Ember relationships is for this kind of stuff, or is to simple things like, comments in posts.. etc. etc..
Thank you!
Aucun commentaire:
Enregistrer un commentaire