Skip to content

Commit

Permalink
feat: episode status
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Jul 15, 2024
1 parent 68897e8 commit 9a3a4ad
Show file tree
Hide file tree
Showing 15 changed files with 288 additions and 50 deletions.
5 changes: 5 additions & 0 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,8 @@ func (c *Client) UpdateEpisodeFile(seriesID int, seasonNum, episodeNum int, file
}
return ep.Update().SetFileInStorage(file).Exec(context.TODO())
}


func (c *Client) SetEpisodeStatus(id int, status episode.Status) error {
return c.ent.Episode.Update().Where(episode.ID(id)).SetStatus(status).Exec(context.TODO())
}
13 changes: 12 additions & 1 deletion ent/episode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions ent/episode/episode.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions ent/episode/where.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions ent/episode_create.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions ent/episode_update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9a3a4ad

Please sign in to comment.