We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug schema里使用StructTag添加的tag,在types里生成的结构体里没有对应的tag
To Reproduce Steps to reproduce the behavior:
// ent/schema/person.go func (Person) Fields() []ent.Field { return []ent.Field{ field.String("name").Comment("姓名").StructTag(`xlsx:"姓名"`).NotEmpty(), field.String("company").Comment("公司").StructTag(`xlsx:"公司"`).NotEmpty(), field.Int("age").StructTag(`xlsx:"年龄"`).Validate(isPositive), } } // types/types.go type PersonInfo struct { BaseIDInfo // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status *uint8 `json:"status,optional"` // 名称 Name *string `json:"name,optional"` // 公司 Company *string `json:"company,optional"` // Age Age *int `json:"age,optional"` }
Expected behavior
type PersonInfo struct { BaseIDInfo // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status *uint8 `json:"status,optional"` // 名称 Name *string `json:"name,optional" xlsx:"姓名"` // 公司 Company *string `json:"company,optional" xlsx:"公司"` // Age Age *int `json:"age,optional" xlsx:"年龄"` }
Screenshots 无
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
目前不支持 StructTag
Sorry, something went wrong.
suyuan32
No branches or pull requests
Describe the bug
schema里使用StructTag添加的tag,在types里生成的结构体里没有对应的tag
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
无
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: