createdAt and expiresAt defaults

Is this the best way?
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow(),
expiresAt: timestamp('expires_at', { withTimezone: true }).default(sql`(now() + interval '7 days')`), 
Was this page helpful?