You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i used this command goctl model mysql datasource --url "root:@tcp(127.0.0.1:3306)/qrmenu" --dir ./internal/model --style go_zero --table "*" --cache=true
my table structure
`-- auto-generated definition
create table group_topping_option
(
id varchar(255) not null
primary key,
shop_id varchar(255) null,
group_topping_id varchar(255) null,
name varchar(255) null,
price int null,
create_at datetime default current_timestamp() not null,
update_at datetime default current_timestamp() not null on update current_timestamp(),
create_by varchar(255) not null,
update_by varchar(255) not null
);
i used this command
goctl model mysql datasource --url "root:@tcp(127.0.0.1:3306)/qrmenu" --dir ./internal/model --style go_zero --table "*" --cache=true
my table structure
`-- auto-generated definition
create table group_topping_option
(
id varchar(255) not null
primary key,
shop_id varchar(255) null,
group_topping_id varchar(255) null,
name varchar(255) null,
price int null,
create_at datetime default current_timestamp() not null,
update_at datetime default current_timestamp() not null on update current_timestamp(),
create_by varchar(255) not null,
update_by varchar(255) not null
);
`
the result i receive:
GroupToppingOption struct {
Id string
db:"id"
ShopId string
db:"shop_id"
GroupToppingId string
db:"group_topping_id"
Name string
db:"name"
Price int64
db:"price"
CreateAt time.Time
db:"create_at"
UpdateAt time.Time
db:"update_at"
CreateBy string
db:"create_by"
UpdateBy string
db:"update_by"
}
I expected Nullstring, NullInt64,..
The text was updated successfully, but these errors were encountered: