diff --git a/ent/migrate/schema.go b/ent/migrate/schema.go index 5648a0d..df83ac5 100644 --- a/ent/migrate/schema.go +++ b/ent/migrate/schema.go @@ -59,7 +59,7 @@ var ( {Name: "password", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, - {Name: "next", Type: field.TypeString, Nullable: true, Default: "20230409"}, + {Name: "next", Type: field.TypeString, Nullable: true, Default: "20230410"}, {Name: "group_users", Type: field.TypeInt, Nullable: true}, } // UsersTable holds the schema information for the "users" table. diff --git a/ent/schema/card.go b/ent/schema/card.go index dee8acb..4e3e9b7 100644 --- a/ent/schema/card.go +++ b/ent/schema/card.go @@ -36,14 +36,15 @@ func (Card) Fields() []ent.Field { } else { card = 0 } + if card == 13 { - card = 14 + card = 1 } + // 2023/04/09 premium card id:15 - //if card == 15 { - // card = 1 - //} - card = 15 + if card == 15 { + card = 1 + } return card }). Optional(), @@ -71,13 +72,13 @@ func (Card) Fields() []ent.Field { rand.Seed(time.Now().UnixNano()) var cp = 1 + rand.Intn(100) if cp == 2 { - cp = 50 + rand.Intn(100) + cp = 50 + rand.Intn(150) } if card >= 1 { - cp = 50 + cp + rand.Intn(200) + cp = 150 + cp + rand.Intn(300) } if super == "super" { - cp = 200 + cp + rand.Intn(300) + cp = 300 + cp + rand.Intn(500) } return cp