1package models
2
3import (
4 "time"
5
6 "github.com/gin-gonic/gin"
7)
8
9type Team struct {
10 Id *int64
11 Name string
12 Slug string
13 OwnerId int64
14 Owner *User
15 UpdatedAt *time.Time
16 CreatedAt *time.Time
17}
18
19func SerializeTeam(team Team) gin.H {
20 return gin.H{
21 "id": team.Id,
22 "name": team.Name,
23 "slug": team.Slug,
24 "ownerId": team.OwnerId,
25 "owner": SerializeUser(*team.Owner),
26 "updatedAt": team.UpdatedAt,
27 "createdAt": team.CreatedAt,
28 }
29}