removed field vac, use date instead

This commit is contained in:
2021-10-22 23:11:35 +02:00
parent f1176fc7e7
commit 7d1dcaa555
10 changed files with 4 additions and 173 deletions

View File

@@ -78,20 +78,6 @@ func (pc *PlayerCreate) SetNillableVanityURLReal(s *string) *PlayerCreate {
return pc
}
// SetVac sets the "vac" field.
func (pc *PlayerCreate) SetVac(b bool) *PlayerCreate {
pc.mutation.SetVac(b)
return pc
}
// SetNillableVac sets the "vac" field if the given value is not nil.
func (pc *PlayerCreate) SetNillableVac(b *bool) *PlayerCreate {
if b != nil {
pc.SetVac(*b)
}
return pc
}
// SetVacDate sets the "vac_date" field.
func (pc *PlayerCreate) SetVacDate(t time.Time) *PlayerCreate {
pc.mutation.SetVacDate(t)
@@ -297,10 +283,6 @@ func (pc *PlayerCreate) ExecX(ctx context.Context) {
// defaults sets the default values of the builder before save.
func (pc *PlayerCreate) defaults() {
if _, ok := pc.mutation.Vac(); !ok {
v := player.DefaultVac
pc.mutation.SetVac(v)
}
if _, ok := pc.mutation.SteamUpdated(); !ok {
v := player.DefaultSteamUpdated()
pc.mutation.SetSteamUpdated(v)
@@ -309,9 +291,6 @@ func (pc *PlayerCreate) defaults() {
// check runs all checks and user-defined validators on the builder.
func (pc *PlayerCreate) check() error {
if _, ok := pc.mutation.Vac(); !ok {
return &ValidationError{Name: "vac", err: errors.New(`ent: missing required field "vac"`)}
}
if _, ok := pc.mutation.SteamUpdated(); !ok {
return &ValidationError{Name: "steam_updated", err: errors.New(`ent: missing required field "steam_updated"`)}
}
@@ -380,14 +359,6 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
})
_node.VanityURLReal = value
}
if value, ok := pc.mutation.Vac(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeBool,
Value: value,
Column: player.FieldVac,
})
_node.Vac = value
}
if value, ok := pc.mutation.VacDate(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeTime,