Skip to content

Commit 8a6d40b

Browse files
committed
#6582 Finance.model.Company & first demo data
1 parent 365940e commit 8a6d40b

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

apps/finance/model/Company.mjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import Model from '../../../src/data/Model.mjs';
2+
3+
/**
4+
* @class Finance.model.Company
5+
* @extends Neo.data.Model
6+
*/
7+
class Company extends Model {
8+
static config = {
9+
/**
10+
* @member {String} className='Finance.model.Company'
11+
* @protected
12+
*/
13+
className: 'Finance.model.Company',
14+
/**
15+
* @member {String} keyProperty='symbol'
16+
*/
17+
keyProperty: 'symbol',
18+
/**
19+
* @member {Object[]} fields
20+
*/
21+
fields: [{
22+
name: 'name',
23+
type: 'String'
24+
}, {
25+
name: 'sector',
26+
type: 'String'
27+
}, {
28+
name: 'symbol',
29+
type: 'String'
30+
}]
31+
}
32+
}
33+
34+
export default Neo.setupClass(Company);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{"symbol": "ADBE", "name": "Adobe Inc.", "sector": "Information Technology"},
3+
{"symbol": "AMD", "name": "Advanced Micro Devices", "sector": "Information Technology"},
4+
{"symbol": "ABNB", "name": "Airbnb", "sector": "Consumer Discretionary"},
5+
{"symbol": "GOOGL", "name": "Alphabet Inc. (Class A)", "sector": "Communication Services"},
6+
{"symbol": "GOOG", "name": "Alphabet Inc. (Class C)", "sector": "Communication Services"},
7+
{"symbol": "AMZN", "name": "Amazon", "sector": "Consumer Discretionary"},
8+
{"symbol": "AEP", "name": "American Electric Power", "sector": "Utilities"},
9+
{"symbol": "AMGN", "name": "Amgen", "sector": "Health Care"},
10+
{"symbol": "ADI", "name": "Analog Devices", "sector": "Information Technology"},
11+
{"symbol": "ANSS", "name": "Ansys", "sector": "Information Technology"}
12+
]

0 commit comments

Comments
 (0)