feat: get table info

This commit is contained in:
zhuyasen
2024-11-24 15:05:26 +08:00
parent 21272aee58
commit e3b6e11e6b
7 changed files with 287 additions and 56 deletions

View File

@@ -30,6 +30,8 @@ type options struct {
IsEmbed bool // is gorm.Model embedded
IsWebProto bool // true: proto file include router path and swagger info, false: normal proto file without router and swagger
IsExtendedAPI bool // true: extended api (9 api), false: basic api (5 api)
IsCustomTemplate bool // true: custom extend template, false: sponge template
}
var defaultOptions = options{
@@ -149,6 +151,13 @@ func WithExtendedAPI() Option {
}
}
// WithCustomTemplate set custom template
func WithCustomTemplate() Option {
return func(o *options) {
o.IsCustomTemplate = true
}
}
func parseOption(options []Option) options {
o := defaultOptions
for _, f := range options {