- 자동 로그인 로직 cookie 로 변경
This commit is contained in:
@@ -18,8 +18,8 @@ export const commentRelations = relations(comment, ({one, many}) => ({
|
||||
|
||||
export const accountRelations = relations(account, ({many}) => ({
|
||||
comments: many(comment),
|
||||
schedules: many(schedule),
|
||||
participants: many(participant),
|
||||
schedules: many(schedule),
|
||||
favorites: many(favorite),
|
||||
follows_follower: many(follow, {
|
||||
relationName: "follow_follower_account_id"
|
||||
@@ -29,15 +29,6 @@ export const accountRelations = relations(account, ({many}) => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
export const scheduleRelations = relations(schedule, ({one, many}) => ({
|
||||
account: one(account, {
|
||||
fields: [schedule.owner],
|
||||
references: [account.id]
|
||||
}),
|
||||
participants: many(participant),
|
||||
favorites: many(favorite),
|
||||
}));
|
||||
|
||||
export const participantRelations = relations(participant, ({one}) => ({
|
||||
schedule: one(schedule, {
|
||||
fields: [participant.scheduleId],
|
||||
@@ -49,6 +40,15 @@ export const participantRelations = relations(participant, ({one}) => ({
|
||||
}),
|
||||
}));
|
||||
|
||||
export const scheduleRelations = relations(schedule, ({one, many}) => ({
|
||||
participants: many(participant),
|
||||
account: one(account, {
|
||||
fields: [schedule.owner],
|
||||
references: [account.id]
|
||||
}),
|
||||
favorites: many(favorite),
|
||||
}));
|
||||
|
||||
export const favoriteRelations = relations(favorite, ({one}) => ({
|
||||
schedule: one(schedule, {
|
||||
fields: [favorite.scheduleId],
|
||||
|
||||
Reference in New Issue
Block a user