Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed May 17, 2024
1 parent b690b8c commit a0c8afa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Models/AccessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,14 @@ export default {

factory: () => faker.random.uuid(),
},

abilities: {
validator: {
rule: schema.enum(['read', 'write', 'admin', 'read|write', 'read|admin', 'write|admin', 'read|write|admin']),
message: '`abilities` must be string of either `read`, `write`, `admin`, `read|write`, `read|admin`, `write|admin`, or `read|write|admin`',
},

factory: () => faker.random.arrayElement(['read', 'write', 'admin', 'read|write', 'read|admin', 'write|admin', 'read|write|admin']),
},
},
} satisfies Model
2 changes: 2 additions & 0 deletions app/Models/Team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default {
primaryKey: 'id', // defaults to `id`
autoIncrement: true, // defaults to true

belongsToMany: ['AccessToken'],

traits: {
useTimestamps: true, // defaults to true
useSeeder: {
Expand Down

0 comments on commit a0c8afa

Please sign in to comment.