How should i define the infinity in my database. i use
- nodejs
- fastify
- sequelize
- sqlite3
There are a few data should deal with:
- deadline: unlimited time or a date, type:string format:date
- usetimes: infinity type:number
Do i need to change the type and validation to fix with the "infinity" words.such as:
//model
usetimes: {
type : DataTypes.Integer, ======> DataTypes.['string','Interger']
allowNull: false,
// validate : {
// min: -1
// }
},
when i change the type,how can i do the validation? Please tell me how to deal with the infinity.