15 lines
422 B
Go
15 lines
422 B
Go
package entities
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
type M_User_Role struct {
|
|
// Timestamp
|
|
UserID uuid.UUID `gorm:"type:uuid;not null;uniqueIndex:idx_user_roles_user_id_role_id" json:"user_id"`
|
|
RoleID uuid.UUID `gorm:"type:uuid;not null;uniqueIndex:idx_user_roles_user_id_role_id" json:"role_id"`
|
|
|
|
User M_User `gorm:"foreignKey:UserID;references:ID"`
|
|
Role M_Role `gorm:"foreignKey:RoleID;references:ID"`
|
|
|
|
Timestamp
|
|
}
|