Initial Commit
This commit is contained in:
13
src/organization/organization.service.ts
Normal file
13
src/organization/organization.service.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { generateId } from "../utils/id";
|
||||
import { CreateOrgInput, orgModel } from "./organization.schema";
|
||||
|
||||
export async function createOrg(input: CreateOrgInput) {
|
||||
const org = await orgModel.create({
|
||||
tenantId: "abc",
|
||||
pid: generateId(),
|
||||
createdAt: new Date(),
|
||||
...input,
|
||||
});
|
||||
|
||||
return org;
|
||||
}
|
||||
Reference in New Issue
Block a user