25 lines
454 B
Go
25 lines
454 B
Go
package models
|
|
|
|
type Person struct {
|
|
Id int `json:"id"`
|
|
Name string `json:"name"`
|
|
Tasks []Task `json:"tasks"`
|
|
}
|
|
|
|
type PersonCreate struct {
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type Task struct {
|
|
Id int `json:"id"`
|
|
PersonId int `json:"person_id"`
|
|
Name string `json:"name"`
|
|
Date string `json:"date"`
|
|
}
|
|
|
|
type TaskCreate struct {
|
|
PersonId int `json:"person_id"`
|
|
Name string `json:"name"`
|
|
Date string `json:"date"`
|
|
}
|