feat: skip model and sql gen options in cli
This commit is contained in:
parent
6c1224017d
commit
436a72ae5c
3 changed files with 41 additions and 20 deletions
|
|
@ -2,14 +2,16 @@ package template
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/utils/dbidentifier"
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgtype"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgtype"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/utils/dbidentifier"
|
||||
)
|
||||
|
||||
// Model is template for model files generation
|
||||
|
|
@ -50,6 +52,12 @@ func (m Model) UseEnum(enumFunc func(enumMetaData metadata.Enum) EnumModel) Mode
|
|||
return m
|
||||
}
|
||||
|
||||
// ShouldSkip returns new Model template with new skip flag set
|
||||
func (m Model) ShouldSkip(skip bool) Model {
|
||||
m.Skip = skip
|
||||
return m
|
||||
}
|
||||
|
||||
// DefaultModel returns default Model template implementation
|
||||
func DefaultModel() Model {
|
||||
return Model{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue