github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/extend/adventure/lib/adventure.go (about)

     1  package adventure
     2  
     3  // We're experimenting with struct tags here atm
     4  type Adventure struct {
     5  	ID        int    `schema:"name=aid;primary;auto"`
     6  	Name      string `schema:"name=name;type=short_text"`
     7  	Desc      string `schema:"name=desc;type=text"`
     8  	CreatedBy int    `schema:"name=createdBy"`
     9  	//CreatedBy int `schema:"name=createdBy;relatesTo=users.uid"`
    10  }
    11  
    12  // TODO: Should we add a table interface?
    13  func (a *Adventure) GetTable() string {
    14  	return "adventure"
    15  }