access_log.go 840 B

1234567891011121314151617181920212223
  1. // Copyright (c) [2022] [巴拉迪维 BaratSemet]
  2. // [ohUrlShortener] is licensed under Mulan PSL v2.
  3. // You can use this software according to the terms and conditions of the Mulan PSL v2.
  4. // You may obtain a copy of Mulan PSL v2 at:
  5. // http://license.coscl.org.cn/MulanPSL2
  6. // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  7. // See the Mulan PSL v2 for more details.
  8. package core
  9. import (
  10. "database/sql"
  11. "time"
  12. )
  13. // AccessLog 访问日志
  14. type AccessLog struct {
  15. ID int64 `db:"id"`
  16. ShortUrl string `db:"short_url"`
  17. AccessTime time.Time `db:"access_time"`
  18. Ip sql.NullString `db:"ip"`
  19. UserAgent sql.NullString `db:"user_agent"`
  20. }