1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-07 06:30:06 +00:00

fix: use custom logic for handling sequence ids

This commit is contained in:
2023-05-01 19:28:51 +05:00
parent d2f011e8a9
commit dba53de646
9 changed files with 76 additions and 93 deletions

15
api/src/model/Counter.ts Normal file
View File

@@ -0,0 +1,15 @@
import mongoose, { Schema } from 'mongoose'
const CounterSchema = new Schema({
id: {
type: String,
required: true,
unique: true
},
seq: {
type: Number,
required: true
}
})
export default mongoose.model('Counter', CounterSchema)