数据关联手机号查询
This commit is contained in:
@@ -114,6 +114,11 @@ func newBill(db *gorm.DB, opts ...gen.DOOption) bill {
|
||||
db: db.Session(&gorm.Session{}),
|
||||
|
||||
RelationField: field.NewRelation("Trade", "models.Trade"),
|
||||
User: struct {
|
||||
field.RelationField
|
||||
}{
|
||||
RelationField: field.NewRelation("Trade.User", "models.User"),
|
||||
},
|
||||
}
|
||||
|
||||
_bill.Resource = billBelongsToResource{
|
||||
@@ -360,6 +365,10 @@ type billBelongsToTrade struct {
|
||||
db *gorm.DB
|
||||
|
||||
field.RelationField
|
||||
|
||||
User struct {
|
||||
field.RelationField
|
||||
}
|
||||
}
|
||||
|
||||
func (a billBelongsToTrade) Where(conds ...field.Expr) *billBelongsToTrade {
|
||||
|
||||
Reference in New Issue
Block a user