forked from shm-open/code-push-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackages_diff.ts
More file actions
35 lines (33 loc) · 977 Bytes
/
Copy pathpackages_diff.ts
File metadata and controls
35 lines (33 loc) · 977 Bytes
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
import { DataTypes, Model } from 'sequelize';
import { sequelize } from '../core/utils/connections';
interface PackagesDiffInterface extends Model {
id: number;
package_id: number;
diff_against_package_hash: string;
diff_blob_url: string;
diff_size: number;
created_at: Date;
updated_at: Date;
}
export const PackagesDiff = sequelize.define<PackagesDiffInterface>(
'PackagesDiff',
{
id: {
type: DataTypes.INTEGER({ length: 10 }),
allowNull: false,
autoIncrement: true,
primaryKey: true,
},
package_id: DataTypes.INTEGER({ length: 10 }),
diff_against_package_hash: DataTypes.STRING,
diff_blob_url: DataTypes.STRING,
diff_size: DataTypes.INTEGER({ length: 10 }),
created_at: DataTypes.DATE,
updated_at: DataTypes.DATE,
},
{
tableName: 'packages_diff',
underscored: true,
paranoid: true,
},
);