Blame view

ihm/app/model/Vector.js 456 Bytes
346b85c6   Benjamin Renard   First commit with...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Ext.define('treps.model.Vector', {
	extend: 'Ext.data.Model',

	fields: [
		{
			name: 'comp_1',
			type: 'string'
		},
		{
			name: 'comp_2',
			type: 'string'
		},
		{
			name: 'comp_3',
			type: 'string'
		},
		{
			name: 'is_pos',
			type: 'boolean',
			defaultValue: false
		}
	],

	validations: [
		{
			type: 'presence',
			field: 'comp_1'
		},
		{
			type: 'presence',
			field: 'comp_2'
		},
		{
			type: 'presence',
			field: 'comp_3'
		}
	]
});