This commit is contained in:
eoao
2025-04-26 17:24:39 +08:00
commit 24ba4772e6
107 changed files with 13612 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import orm from '../entity/orm';
import { att } from '../entity/att';
import { and, eq } from 'drizzle-orm';
const attService = {
async addAtt(c, params) {
await orm(c).insert(att).values(params).run();
},
async list(c, params, userId) {
const { emailId } = params;
const list = await orm(c).select().from(att).where(
and(
eq(att.emailId, emailId),
eq(att.userId, userId)))
.all();
return list;
}
};
export default attService;