(bookId, memberId int)
| 88 | } |
| 89 | |
| 90 | func (m *Relationship) FindForRoleId(bookId, memberId int) (int, error) { |
| 91 | o := orm.NewOrm() |
| 92 | err := o.QueryTable(m.TableNameWithPrefix()).Filter("book_id", bookId).Filter("member_id", memberId).One(m, "role_id") |
| 93 | if err != nil { |
| 94 | return 0, err |
| 95 | } |
| 96 | return m.RoleId, nil |
| 97 | } |
| 98 | |
| 99 | func (m *Relationship) FindByBookIdAndMemberId(bookId, memberId int) (*Relationship, error) { |
| 100 | o := orm.NewOrm() |
no test coverage detected