Current section

Files

Jump to
ami lib ami promo_code.ex
Raw

lib/ami/promo_code.ex

defmodule Ami.PromoCode do
use Ecto.Schema
alias Ami.{
Course,
Package
}
schema "promo_codes" do
@timestamps_opts [type: :naive_datetime_usec]
field(:value, :string)
field(:discount, :float)
field(:created_at, :utc_datetime_usec)
field(:updated_at, :utc_datetime_usec)
belongs_to(:course, Course)
belongs_to(:package, Package)
end
end