Advertisement
Guest User

Sample model

a guest
Mar 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export const IndexCommodityGroup = Map.extend({
  2.     define: {
  3.         indexCommodityGroupID: {
  4.             type: 'number',
  5.             serialize: false,           value: null
  6.         },
  7.         indexCommodityGroupName: {
  8.             type: 'string',
  9.                         value: null
  10.         },
  11.         createdDateTime: {
  12.             type: 'date',
  13.             serialize: false,           value: null
  14.         },
  15.         createdBy: {
  16.             type: 'string',
  17.             serialize: false,           value: null
  18.         },
  19.         modifiedDateTime: {
  20.             type: 'date',
  21.             serialize: false,           value: null
  22.         },
  23.         modifiedBy: {
  24.             type: 'string',
  25.             serialize: false,           value: null
  26.         },
  27.         indexCommodities: {
  28.             type: function(val,name) { return new IndexCommodity.List(val); },
  29.             serialize: false
  30.         },
  31.     }
  32. });
  33.  
  34. export const IndexCommodityGroupValidation = {
  35.     indexCommodityGroupName: { length: {maximum: 255}},
  36. };
  37.  
  38. IndexCommodityGroup.List = List.extend({
  39.     Map: IndexCommodityGroup
  40. }, {});
  41.  
  42. export const IndexCommodityGroupConnection = superMap({
  43.     url: url + '/mrl/indexcommoditygroup',
  44.     idProp: 'id',
  45.     Map: IndexCommodityGroup,
  46.     List: IndexCommodityGroup.List,
  47.     Validation: IndexCommodityGroupValidation,
  48.     name: 'indexcommoditygroup',
  49.     algebra: new set.Algebra(set.props.id("id"))
  50. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement