telecomReport.js
1.65 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* Created by Tommy Huang on 18/04/28.
*/
const sequelize = require('./db').db
const { INTEGER, STRING, BOOLEAN, TEXT, TIME } = require('sequelize')
const TelecomReport = sequelize.define('telecom_report', {
id: {
type: STRING,
primaryKey: true
},
userId: {
type: STRING,
field: 'user_id',
allowNull: false,
},
source: { // 运营商
type: STRING,
allowNull: false
},
number: { // 号码
type: STRING,
allowNull: false
},
raw: { //获取到的json
type: TEXT,
allowNull: true
},
mobileStatus: { //账户状态。正常、欠费、停机、销户、未激活、未知
field: 'mobile_status',
type: STRING,
allowNull: true,
},
netTime: { // 入网时间, YYYY-MM-DD或未知
field: 'net_time',
type: STRING,
allowNull: true
},
netAge: { // 网龄。整形数字精确到月或未知
field: 'net_age',
type: STRING,
allowNull: true
},
payType: { // 缴费类型
field: 'pay_type',
type: STRING,
allowNull: true
},
address: { // 联系地址。脱敏部分用*替代
type: STRING,
allowNull: true
},
email: { // 邮箱地址。如:123@qq.com
type: STRING,
allowNull: true
},
contactNo: {
type: STRING,
field: 'contact_no',
allowNull: true
},
taskId: {
type: STRING,
field: 'task_id',
allowNull: false
},
totalCallTime: {
type: INTEGER,
field: 'total_call_time',
allowNull: true
},
totalCallCount: {
type: INTEGER,
field: 'total_call_count',
allowNull: true
},
}, {
timestamp: true,
createdAt: 'created_at',
updatedAt: 'updated_at',
})
module.exports = TelecomReport