Adds a publication workflow to a resource
Generates a publication resource that moves from :draft to :scheduled,
goes :published once its publish_at passes, and can be unpublished and
republished. The subject gains has_one :publication and a published?
calculation. When the subject does not exist, it is created with
mix ash.gen.resource first.
Nobody may create a publication until the application defines who can, in
the generated Checks.CanCreate module. Nobody may schedule, publish or
unpublish until it does the same in Checks.CanPublish.
Example
mix ash_workflow.gen.publication MyApp.Blog.Post --with-unpublish-at
Options
--module- the publication resource's module name. Defaults to the subject's name withPublicationappended.--domain- the domain for a subject the task creates. Required only when the subject does not exist.--with-unpublish-at- generates anunpublish_atattribute, set when scheduling or republishing, that moves a publication to:unpublishedonce it passes. Defaults tofalse.--transition-log- also generates a transition log for the publication withmix ash_workflow.gen.transition_log. Defaults totrue.