feat: prepare for dynamic user type
This commit is contained in:
parent
a2e38d7069
commit
3fcabd723b
1 changed files with 2 additions and 2 deletions
|
|
@ -30,10 +30,10 @@ async function userBranchCodeGen(branch: Branch, user: User[]) {
|
||||||
|
|
||||||
const last = await tx.runningNo.upsert({
|
const last = await tx.runningNo.upsert({
|
||||||
where: {
|
where: {
|
||||||
key: `BR_USR_${branch.code.slice(4).padEnd(3, "0")}${typ !== "USER" ? typ.charAt(0) : ""}`,
|
key: `BR_USR_${branch.code.slice(4).padEnd(3, "0")}${typ !== "USER" ? typ.charAt(0).toLocaleUpperCase() : ""}`,
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
key: `BR_USR_${branch.code.slice(4).padEnd(3, "0")}${typ !== "USER" ? typ.charAt(0) : ""}`,
|
key: `BR_USR_${branch.code.slice(4).padEnd(3, "0")}${typ !== "USER" ? typ.charAt(0).toLocaleUpperCase() : ""}`,
|
||||||
value: 1,
|
value: 1,
|
||||||
},
|
},
|
||||||
update: { value: { increment: 1 } },
|
update: { value: { increment: 1 } },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue