Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // app/models/server-item.js
- export default DS.Model.extend({
- hostName: DS.attr('string'),
- syncServers: DS.hasMany('string'),
- subscribers: DS.hasMany('string'),
- mailHost: DS.attr('string'),
- mailHostLogin: DS.hasMany('credentials')
- });
- // app/models/credentials.js
- export default DS.Model.extend({
- user: DS.attr('string'),
- password: DS.attr('string'),
- server: DS.belongsTo('serverItem')
- });
- "serverItems": [
- {
- "id": 1,
- "hostName": "foo",
- "syncServers": [
- <stringids>
- ],
- "subscribers": [
- <stringids>
- ],
- "mailHost": "foo",
- "mailHostLogin": [
- <Credentialsids>
- ]
- }
- ],
- "credentials": [
- {
- "id": 1,
- "user": "foo",
- "password": "foo",
- "server": <ServerItemid>
- }
- ]
- "serverItems": [
- {
- "id": 1,
- "host_name": "foo",
- "sync_server_ids": [
- <stringids>
- ],
- "subscriber_ids": [
- <stringids>
- ],
- "mail_host": "foo",
- "mail_host_login_ids": [
- <Credentialsids>
- ]
- }
- ],
- "credentials": [
- {
- "id": 1,
- "user": "foo",
- "password": "foo",
- "server_id": <ServerItemid>
- }
- ]
- {
- "data": {
- "type": "server-items",
- "id": "1",
- "attributes": {
- "HostName": "foo",
- "MailHost": "foo",
- },
- "relationships": {
- "SyncServers": {
- "data": {
- "type": "SyncServers",
- "id": <SyncServersid>
- }
- },
- "Subscribers": {
- "data": {
- "type": "Subscribers",
- "id": <Subscribersid>
- }
- },
- "MailHostLogin": {
- "data": {
- "type": "MailHostLogin",
- "id": <MailHostLoginid>
- }
- }
- },
- "included": [
- {
- <sideloadedrelationships>
- ]
- }
- }
- }
- {
- "data": {
- "type": "credentials",
- "id": "1",
- "attributes": {
- "User": "foo",
- "Password": "foo",
- },
- "relationships": {
- "Server": {
- "data": {
- "type": "Server",
- "id": <Serverid>
- }
- }
- },
- "included": [
- {
- <sideloadedrelationships>
- ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement