mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
renaming organisation and team columns
This commit is contained in:
parent
b664f10fec
commit
5a2b08505a
2 changed files with 11 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ export const organisation = pgTable("organisation", {
|
|||
.defaultNow()
|
||||
.notNull(),
|
||||
hubspotCompanyId: text("hubspot_company_id"),
|
||||
companyName: text("company_name"),
|
||||
name: text("name"),
|
||||
});
|
||||
|
||||
export type Organisation = InferModel<typeof organisation, "select">;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ import { portfolio, roleEnum } from "./portfolio";
|
|||
|
||||
export const team = pgTable("team", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
teamName: text("team_name").notNull(),
|
||||
orgId: uuid("org_id").notNull().references(() => organisation.id),
|
||||
name: text("name").notNull(),
|
||||
orgId: uuid("org_id")
|
||||
.notNull()
|
||||
.references(() => organisation.id),
|
||||
createdAt: timestamp("created_at", { precision: 6, withTimezone: true })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
|
|
@ -21,7 +23,9 @@ export const teamMembers = pgTable("team_members", {
|
|||
userId: bigint("user_id", { mode: "bigint" })
|
||||
.notNull()
|
||||
.references(() => user.id),
|
||||
teamId: uuid("team_id").notNull().references(() => team.id),
|
||||
teamId: uuid("team_id")
|
||||
.notNull()
|
||||
.references(() => team.id),
|
||||
createdAt: timestamp("created_at", { precision: 6, withTimezone: true })
|
||||
.defaultNow()
|
||||
.notNull(),
|
||||
|
|
@ -32,7 +36,9 @@ export const teamMembers = pgTable("team_members", {
|
|||
|
||||
export const teamPortfolioPermissions = pgTable("team_portfolio_permissions", {
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
teamId: uuid("team_id").notNull().references(() => team.id),
|
||||
teamId: uuid("team_id")
|
||||
.notNull()
|
||||
.references(() => team.id),
|
||||
portfolioId: bigint("portfolio_id", { mode: "bigint" })
|
||||
.notNull()
|
||||
.references(() => portfolio.id),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue