Built motion from commit 1038d87.|0.0.141
[motion.git] / server / models / tools_sound.js
1 'use strict';
2
3
4 module.exports = function(sequelize, DataTypes) {
5
6         var Sound = sequelize.define('Sound', {
7                 name: DataTypes.STRING,
8                 save_name: DataTypes.STRING,
9                 display_name: {
10                         type: DataTypes.STRING,
11                         allowNull: false,
12                         defaultValue: '',
13                         validate: {
14                                 notEmpty: {
15                                         msg: "The name cannot be empty!"
16                                 } // don't allow empty strings
17                         }
18                 },
19                 description: DataTypes.STRING,
20                 original_format: DataTypes.STRING,
21                 original_duration: DataTypes.FLOAT,
22                 original_sampleCount: DataTypes.BIGINT,
23                 original_channelCount: DataTypes.INTEGER,
24                 original_bitRate: DataTypes.BIGINT,
25                 original_sampleRate: DataTypes.INTEGER,
26                 converted_format: DataTypes.STRING,
27                 converted_duration: DataTypes.FLOAT,
28                 converted_sampleCount: DataTypes.BIGINT,
29                 converted_channelCount: DataTypes.INTEGER,
30                 converted_bitRate: DataTypes.BIGINT,
31                 converted_sampleRate: DataTypes.INTEGER
32         }, {
33                 tableName: 'tools_sounds'
34         });
35
36         return Sound;
37 };