File tree Expand file tree Collapse file tree 7 files changed +17
-10
lines changed Expand file tree Collapse file tree 7 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class MakeCommand extends BaseGenerator {
30
30
public static commandName = 'make:command'
31
31
public static description = 'Make a new ace command'
32
32
33
- @args . string ( { description : 'Make of the command class' } )
33
+ @args . string ( { description : 'Name of the command class' } )
34
34
public name : string
35
35
36
36
/**
Original file line number Diff line number Diff line change @@ -35,10 +35,10 @@ export default class MakeController extends BaseGenerator {
35
35
public static commandName = 'make:controller'
36
36
public static description = 'Make a new HTTP controller'
37
37
38
- @args . string ( { description : 'Make of the controller class' } )
38
+ @args . string ( { description : 'Name of the controller class' } )
39
39
public name : string
40
40
41
- @flags . boolean ( { description : 'Add resourceful methods to the controller class' , alias : 'r' } )
41
+ @flags . boolean ( { description : 'Adds resourceful methods to the controller class' , alias : 'r' } )
42
42
public resource : boolean
43
43
44
44
/**
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default class MakeMiddleware extends BaseGenerator {
29
29
public static commandName = 'make:middleware'
30
30
public static description = 'Make a new middleware'
31
31
32
- @args . string ( { description : 'Make of the middleware class' } )
32
+ @args . string ( { description : 'Name of the middleware class' } )
33
33
public name : string
34
34
35
35
/**
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class MakeModel extends BaseGenerator {
30
30
public static commandName = 'make:model'
31
31
public static description = 'Make a new Lucid model'
32
32
33
- @args . string ( { description : 'Make of the model class' } )
33
+ @args . string ( { description : 'Name of the model class' } )
34
34
public name : string
35
35
36
36
/**
Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ export default class MakeProvider extends BaseGenerator {
34
34
public static commandName = 'make:provider'
35
35
public static description = 'Make a new IoC container provider'
36
36
37
- @args . string ( { description : 'Make of the provider class' } )
37
+ @args . string ( { description : 'Name of the provider class' } )
38
38
public name : string
39
39
40
- @flags . boolean ( { description : 'Register provider under the ace providers array' } )
40
+ @flags . boolean ( { description : 'Registers provider under the ace providers array' } )
41
41
public ace : boolean
42
42
43
43
/**
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class MakeValidator extends BaseGenerator {
30
30
public static commandName = 'make:validator'
31
31
public static description = 'Make a new validator'
32
32
33
- @args . string ( { description : 'Name of the validator' } )
33
+ @args . string ( { description : 'Name of the validator class ' } )
34
34
public name : string
35
35
36
36
/**
Original file line number Diff line number Diff line change
1
+ import { DateTime } from 'luxon'
1
2
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
2
3
3
4
export default class ${filename} extends BaseModel {
4
5
@column({ isPrimary: true })
5
6
public id: number
6
7
7
8
public static $columns: Pick<
8
- filename,
9
- 'id '
9
+ ${ filename} ,
10
+ 'id' | 'createdAt' | 'updatedAt '
10
11
>
12
+
13
+ @column.dateTime({ autoCreate: true })
14
+ public createdAt: DateTime
15
+
16
+ @column.dateTime({ autoCreate: true, autoUpdate: true })
17
+ public updatedAt: DateTime
11
18
}
You can’t perform that action at this time.
0 commit comments