import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  message: attr('string'),
  created_time: attr('string'),
  is_published: attr('boolean'),
  page: belongsTo('page', {async: true})
});
import attr from "ember-data/attr";
import Model from "ember-data/model";


export default Model.extend({
	//channel: belongsTo( "twitchChannel" ),
	created_at: attr( "date" )

}).reopenClass({
	toString() { return "kraken/users/:user_id/subscriptions"; }
});
Exemple #3
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { hasMany } from 'ember-data/relationships';

export default Model.extend({
	parentId: attr('number'),
	alpha3: attr('string'),
	name: attr('string'),
	languages: hasMany('core/language')
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';
import { computed } from '@ember/object';
import moment from 'moment';

export default Model.extend({
  name:        attr('string', { defaultValue: '' }),
  title:       attr('string', { defaultValue: '' }),
  description: attr('string'),

  availableInternally: attr('boolean'),
  internalDuration:    attr('number'), // number of days that this job is internally available before posting to outside sources
  positions:           attr('number', { defaultValue: 1 }), // number of positions to fill
  sendCloseNotice:     attr('boolean'), // send an email to unrejected talent when job closes
  allocateTalentPool:  attr('boolean'), // allocate unrejected, not hired talent to the pool
  applicantScoring:    attr('boolean'),
  closed:              attr('boolean'),

  jobType:                 attr('string'),
  eeoCategory:             attr('string'),
  supervisoryRequirements: attr('boolean'),

  setup:          attr('boolean', { defaultValue: true }),
  setupStep:      attr('number'),
  setupProgress:  attr('number'),
  completedSetup: attr('date'),

  job:                    belongsTo('job'),
  company:                belongsTo('company'),
  creator:                belongsTo('employee'),
export {
	qualitiesStreamlink as qualities,
	qualitiesStreamlink,
	qualitiesLivestreamer
};


/**
 * @class Stream
 */
export default Model.extend({
	/** @property {TwitchStream} stream */
	stream: belongsTo( "twitchStream", { async: false } ),
	/** @property {TwitchChannel} channel */
	channel: belongsTo( "twitchChannel", { async: false } ),
	quality: attr( "string" ),
	chat_open: attr( "boolean" ),
	started: attr( "date" ),


	// let Streamlink/Livestreamer use the GUI's client-id
	clientID: `Client-ID=${clientId}`,

	// passthrough type (twitch streams are HLS)
	playerInputPassthrough: "hls",

	/** @property {String} status */
	status: STATUS_PREPARING,

	/** @property {ChildProcess} spawn */
	spawn: null,
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  type: attr('string'),
  name: attr('string'),
  friend: attr('string')
});
Exemple #7
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  regions: attr(),
  sizes: attr(),
  keys: attr()
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  name: attr(),
  description: attr(),
  price: attr(),
  image: attr(),
  category: attr(),
  feedbacks: hasMany('feedback', { async: true}),
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  email: attr('string'),
  role: attr('string'),
  firstName: attr('string'),
  lastName: attr('string'),
  category: attr('string'),
  manager: attr('string')
});
Exemple #10
0
import Ember from 'ember';
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import {
  belongsTo
} from 'ember-data/relationships';


var Goal = Model.extend({

  // attributes
  title: attr('string'),
  value: attr('number', {
    defaultValue: 0
  }),

  // relationships
  person: belongsTo(),

  // properties

  colour: Ember.computed('value', function() {
  })

});


Goal.reopenClass({
  FIXTURES: [{
    id: 1,
    title: 'Create demo app',
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  email: attr('string'),
  password: attr('string'),
  username: attr('string')
});
Exemple #12
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  name: attr('string'),
  date: attr('date'),
  official: attr('boolean')
});
Exemple #13
0
import Model from 'ember-data/model';
import DurationCalculations from 'travis/mixins/duration-calculations';
import attr from 'ember-data/attr';
import { hasMany, belongsTo } from 'ember-data/relationships';

const { service } = Ember.inject;
var Build;

Build = Model.extend(DurationCalculations, {
  branch: belongsTo('branch', { async: false, inverse: 'builds' }),
  branchName: Ember.computed.alias('branch.name')
});

Build.reopen({
  ajax: service(),
  state: attr(),
  number: attr('number'),
  message: attr('string'),
  _duration: attr('number'),
  _config: attr(),
  _startedAt: attr(),
  _finishedAt: attr('string'),
  pullRequest: attr('boolean'),
  pullRequestTitle: attr(),
  pullRequestNumber: attr('number'),
  eventType: attr('string'),
  repo: belongsTo('repo', { async: true }),
  repoCurrentBuild: belongsTo('repo', { async: true, inverse: 'currentBuild' }),
  commit: belongsTo('commit', { async: false }),
  jobs: hasMany('job', { async: true }),
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';
import { computed } from '@ember/object';

export default Model.extend({
	author: belongsTo('user'),
	brewingSession: belongsTo('brewing-session'),
	children: hasMany('brewing-session-comment', { inverse: 'parent' }),
	parent: belongsTo('brewing-session-comment', { inverse: 'children' }),
	isRoot: computed('parent.content', function () {
		// The root comments are those without a parent comment
		if (this.get('parent.content')) {
			return false;
		}
		else {
			return true;
		}
	}),
	content: attr('string'),
	created: attr('date', { defaultValue() { return new Date(); } })
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
  body: attr(),
  closedAt: attr(),
  commentsUrl: attr(),
  eventsUrl: attr(),
  githubCreatedAt: attr(),
  githubId: attr(),
  githubUpdatedAt: attr(),
  htmlUrl: attr(),
  labelsUrl: attr(),
  locked: attr(),
  number: attr(),
  state: attr(),
  title: attr(),
  url: attr(),

  githubRepo: belongsTo('github-repo', { async: true })
});
import attr from 'ember-data/attr';
import Collection from './collection';

export default Collection.extend({
  website: attr('string'),
  city: attr('string'),
  state: attr('string'),
  country: attr('string'),
  startDate: attr('date'),
  endDate: attr('date'),
  submissionDate: attr('date'),
  closeDate: attr('date'),
  logo: attr(),
  tags: attr(),
  sponsors: attr('array'),
  description: attr('string'),
  author: attr('string'),
});
Exemple #17
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { hasMany } from 'ember-data/relationships';
import { belongsTo } from 'ember-data/relationships';

export default Model.extend({
  title: attr('string'),
  start_date: attr('date'),
  end_date: attr('date'),
  market: attr('string'),
  program: belongsTo('program'),
  profiles: hasMany('profile'),
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  caseNo: attr(),
  hspId: attr(),
  mrNo: attr(),
  admTime: attr(),
  height: attr(),
  weight: attr(),
  bmi: attr(),
  chiefComplaint: attr(),
  presentIllenss: attr(),
  pastHistory: attr(),
  allergicHistory: attr(),
  familyHistory: attr(),
  systemReview: attr(),
  accessoryExam: attr(),
  diaId: attr(),
  medicationInpatient: attr(),
  treament: attr(),
  pastHistoryCardiopathy: attr(),
  medication: attr()
});
Exemple #19
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  firstname: attr('string'),
  lastname: attr('string'),
  email: attr('string'),
  phone: attr('string'),
  day_birthday: attr('number'),
  month_birthday: attr('number'),
  year_birthday: attr('number'),
  description: attr('string'),
  avatar: attr('string'),
  token: attr('string'),
  search: attr('string'),
  status: attr('string'),
  isShowing: attr('string', { defaultValue: false }),

  fullname: Ember.computed('firstname', 'lastname', function() {
    return this.get('firstname').capitalize() + ' ' + this.get('lastname').capitalize()
  }),

  age: Ember.computed('day_birthday', 'month_birthday', 'year_birthday', function() {
    var date = this.get('year_birthday') + '/' + this.get('month_birthday') + '/' + this.get('day_birthday');
    return moment().diff(date, 'years');
  })

});
Exemple #20
0
import { alias, equal } from '@ember/object/computed';
import { computed } from '@ember/object';
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';
import { fragmentArray } from 'ember-data-model-fragments/attributes';
import shortUUIDProperty from '../utils/properties/short-uuid';
import sumAggregation from '../utils/properties/sum-aggregation';

export default Model.extend({
  shortId: shortUUIDProperty('id'),

  job: belongsTo('job', { inverse: 'deployments' }),
  jobForLatest: belongsTo('job', { inverse: 'latestDeployment' }),
  versionNumber: attr('number'),

  // If any task group is not promoted yet requires promotion and the deployment
  // is still running, the deployment needs promotion.
  requiresPromotion: computed('*****@*****.**', function() {
    return (
      this.get('status') === 'running' &&
      this.get('taskGroupSummaries')
        .toArray()
        .some(summary => summary.get('requiresPromotion') && !summary.get('promoted'))
    );
  }),

  status: attr('string'),
  statusDescription: attr('string'),

  isRunning: equal('status', 'running'),
Exemple #21
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
  price: attr(),
  description: attr(),
  name: attr(),
  screenSize: attr(),
  color: attr(),
  weight: attr(),
  image: attr(),
});
Exemple #22
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';
import Em from 'ember';

export default Model.extend({
  firstName: attr('string'),
  lastName: attr('string'),
  username: attr('string'),
  birthday: attr('number'),
  gender: attr('string', 'unspecified'),
  email: attr('string'),

  bio: attr('string', {
    defaultValue: ''
  }),
  photo: attr('string', {
    defaultValue: ''
  }),
  background: attr('string', {
    defaultValue: ''
  }),

  social: belongsTo('member-social'),
  public: attr('boolean', {
    defaultValue: true
  }),

  ratings: hasMany('rating'),
  items: hasMany('item'),
  reviews: hasMany('review'),
Exemple #23
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import DS from 'ember-data';

export default  DS.Model.extend({
  name: attr('string'),
  symbol: attr('string')
  //prices: DS.hasMany('comment');
});
Exemple #24
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
// import EmberValidations from 'ember-validations';

// import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  validations: {
    'model.name': {
      presence: true,
      length: { minimum: 5, maximum: 50 }
    },
    'model.email': {
      presence: true,
      format: { with: /.+@.+\..{2,4}/ }
    },
  },
  name: attr('string'),
  email: attr('string'),
  role: attr('string'),
  password: attr('string')
});
Exemple #25
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';

export default Model.extend({
    title: attr(),
    date: attr(),
    category: attr(),
    content: attr()
});
Exemple #26
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
	name: attr(),
	thumbnailSubtitle: attr(),
	description: attr(),
	subtitle: attr(),
	thumbnailImage: attr(),
	thumbnailImageSrcset: attr(),
	thumbnailImageSizes: attr(),
	bannerImage: attr(),
	bannerImageSrcset: attr(),
	bannerImageSizes: attr(),
	contents: hasMany('content')
});
Exemple #27
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  name: attr('string'),
  pairs: hasMany('pair'),
  events: hasMany('event'),
  variables: hasMany('variable'),
});
import Ember from 'ember';
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
// import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  changeType: attr('string'),
  entryDate: attr('string'),
  value: attr('number'),
  isExpense: Ember.computed('changeType', function(){
    return this.get('changeType') === 'expense';
  }),
  isIncome: Ember.computed.not('isExpense')
});
Exemple #29
0
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import ValidationEngine from 'ghost/mixins/validation-engine';

export default Model.extend(ValidationEngine, {
    validationType: 'tag',

    uuid: attr('string'),
    name: attr('string'),
    slug: attr('string'),
    description: attr('string'),
    parent: attr(),
    meta_title: attr('string'),
    meta_description: attr('string'),
    image: attr('string'),
    hidden: attr('boolean'),
    created_at: attr('moment-date'),
    updated_at: attr('moment-date'),
    created_by: attr(),
    updated_by: attr(),
    count: attr('raw')
});
Exemple #30
0
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
// import { belongsTo, hasMany } from 'ember-data/relationships';

export default Model.extend({
  email: attr('string'),
  password: attr('string'),
  firstName: attr('string'),
  lastName: attr('string'),
  department: attr('string'),
  phoneNumber: attr('string'),
  summary: attr('string')
});