playlist.go 508 B

1234567891011121314151617181920212223
  1. package dtos
  2. type PlaylistDashboard struct {
  3. Id int64 `json:"id"`
  4. Slug string `json:"slug"`
  5. Title string `json:"title"`
  6. Uri string `json:"uri"`
  7. Order int `json:"order"`
  8. }
  9. type PlaylistDashboardsSlice []PlaylistDashboard
  10. func (slice PlaylistDashboardsSlice) Len() int {
  11. return len(slice)
  12. }
  13. func (slice PlaylistDashboardsSlice) Less(i, j int) bool {
  14. return slice[i].Order < slice[j].Order
  15. }
  16. func (slice PlaylistDashboardsSlice) Swap(i, j int) {
  17. slice[i], slice[j] = slice[j], slice[i]
  18. }