File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ import { validateDriverModel } from '@db/driver'
2+ import { User } from '../schemas/User.schema'
3+ import { createSchemaModel } from '@db/driver'
4+
5+ /* --- Model ----------------------------------------------------------------------------------- */
6+
7+ export const Users = createSchemaModel ( User )
8+
9+ /* --- Drivers --------------------------------------------------------------------------------- */
10+
11+ export const driverModel = validateDriverModel ( Users . driver )
Original file line number Diff line number Diff line change 1+ import { z , schema } from '@green-stack/schemas'
2+ import { partials } from '@app/registries/schemas.partials'
3+
4+ /* --- Description ----------------------------------------------------------------------------- */
5+
6+ const d = "Essential user info"
7+
8+ /** --- User ----------------------------------------------------------------------------------- */
9+ /** -i- Essential user info */
10+ export const User = schema ( 'User' , {
11+
12+ userId : z
13+ . string ( )
14+ . index ( )
15+ . unique ( )
16+ . describe ( 'Auth provider sub or user ID' ) ,
17+ email : z
18+ . string ( )
19+ . unique ( )
20+ . describe ( 'Primary Github email used during OAuth' ) ,
21+
22+ // -i- Partial fields from other modules / features / packages / plugins
23+
24+ ...partials . User ,
25+
26+ } ) . describe ( d )
27+
28+ /* --- Type Alias ------------------------------------------------------------------------------ */
29+
30+ export type User = z . input < typeof User >
Original file line number Diff line number Diff line change 11// -i- Auto generated with "npx turbo run @green-stack/core#collect:schemas"
2+ export { User } from '@app/core/schemas/User.schema'
23export { HealthCheckOutput } from '@app/core/schemas/HealthCheckOutput'
34export { HealthCheckInput } from '@app/core/schemas/HealthCheckInput'
You can’t perform that action at this time.
0 commit comments