callRecord.js
1.53 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* Created by Tommy Huang on 18/04/28.
*/
const sequelize = require('./db').db
const { INTEGER, STRING, BOOLEAN, TEXT, TIME } = require('sequelize')
const CallRecord = sequelize.define('call_record', {
id: {
type: STRING,
primaryKey: true
},
telecomReportId: {
type: STRING,
field: 'telecom_report_id',
allowNull: false,
},
callCost: { // 费用小计。整形数字精确到分
type: STRING,
field: 'call_cost',
allowNull: false,
},
contactType: { // 号码分类。如银行、律师、快递等
type: STRING,
field: 'contact_type',
allowNull: true,
},
contactName: { // 号码标签。若有多个标签,用”;”分割
type: STRING,
field: 'contact_name',
allowNull: true,
},
callTypeName: { // 呼叫类型。主叫、被叫、呼转、未知
type: STRING,
field: 'call_type_name',
allowNull: true,
},
callTime: { // 通话时长。时长精确到秒
type: INTEGER,
field: 'call_time',
allowNull: true,
},
callOtherNumber: { // 对方号码
type: STRING,
field: 'call_other_number',
allowNull: true,
},
callStartTime: { // 对方号码
type: TIME,
field: 'call_start_time',
allowNull: true,
},
contactArea: { // 对方号码
type: STRING,
field: 'contact_area',
allowNull: true,
},
callAddress: { // 对方号码
type: STRING,
field: 'call_address',
allowNull: true,
},
}, {
timestamp: true,
createdAt: 'created_at',
updatedAt: 'updated_at',
})
module.exports = CallRecord