-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tested a different implementation of canteen rating tags
- Loading branch information
1 parent
a9e072c
commit 0be95e2
Showing
2 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package model | ||
|
||
// CanteenRatingTag struct is a row record of the either the dish_tag_ratings-table or the cafeteria_rating_tags-table in the database | ||
// CanteenRatingTag connects Canteens with ratings | ||
type CanteenRatingTag struct { | ||
CafeteriaRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:CanteenRatingTag;type:int;not null;" json:"CanteenRatingTag" ` | ||
CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;" json:"correspondingRating"` | ||
Points int32 `gorm:"column:points;type:int;not null;" json:"points"` | ||
TagID int64 `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;" json:"tagID"` | ||
CanteenRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:CafeteriaRatingTag"` | ||
CorrespondingRatingID int64 | ||
CorrespondingRating CanteenRating | ||
TagID int64 | ||
Tag CanteenRatingTagOption | ||
Points int32 | ||
} |