diff --git a/internal/database/account/account.go b/internal/database/account/account.go index ed006cd..9d17c37 100644 --- a/internal/database/account/account.go +++ b/internal/database/account/account.go @@ -1,17 +1,3 @@ -// Copyright 2024 perp (supernets) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package account import ( @@ -29,8 +15,9 @@ type Account struct { // Account model type Model struct { ID int64 - Username string `xorm:"varchar(30) unique"` - Password string `xorm:"varchar(90)"` + Username string `xorm:"varchar(30) unique"` + Password string `xorm:"varchar(90)"` + Admin bool Created time.Time `xorm:"created"` } diff --git a/internal/database/account/insert.go b/internal/database/account/insert.go index 4d2eab5..122467b 100644 --- a/internal/database/account/insert.go +++ b/internal/database/account/insert.go @@ -1,17 +1,3 @@ -// Copyright 2024 perp (supernets) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package account import "github.com/rs/zerolog/log" diff --git a/internal/database/account/select.go b/internal/database/account/select.go index d8e32d9..a578bbd 100644 --- a/internal/database/account/select.go +++ b/internal/database/account/select.go @@ -1,17 +1,3 @@ -// Copyright 2024 perp (supernets) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package account import "github.com/rs/zerolog/log" diff --git a/internal/database/database.go b/internal/database/database.go index 742b4dc..5c24e94 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -1,17 +1,3 @@ -// Copyright 2024 perp (supernets) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package database import ( @@ -19,7 +5,6 @@ import ( "git.supernets.org/perp/gopay/internal/database/account" _ "github.com/mattn/go-sqlite3" - //_ "github.com/jackc/pgx/v5/stdlib" "github.com/rs/zerolog/log" "xorm.io/xorm" )