From de4eeb668cdae1ae8ddfb2ae0b374bd75deee1cb Mon Sep 17 00:00:00 2001 From: odboy Date: Sat, 9 Nov 2024 02:27:57 +0800 Subject: [PATCH] feat: add TableName() --- dao/resolve_config.go | 4 ++++ dao/resolve_record.go | 4 ++++ dns.sqlite3 | Bin 36864 -> 36864 bytes 3 files changed, 8 insertions(+) diff --git a/dao/resolve_config.go b/dao/resolve_config.go index 2a18407..392df4d 100644 --- a/dao/resolve_config.go +++ b/dao/resolve_config.go @@ -14,6 +14,10 @@ type ResolveVersion struct { CurrentVersion int `xorm:"not null integer 'curr_version'"` } +func (ResolveVersion) TableName() string { + return "resolve_version" +} + func GetResolveVersion() int { var records []ResolveVersion err := Engine.Table("resolve_config").Where("`id` = ?", 1).Find(&records) diff --git a/dao/resolve_record.go b/dao/resolve_record.go index 67cf2c2..f0f876f 100644 --- a/dao/resolve_record.go +++ b/dao/resolve_record.go @@ -21,6 +21,10 @@ type ResolveRecord struct { Version int `xorm:"not null integer 'version'"` } +func (ResolveRecord) TableName() string { + return "resolve_record" +} + func FindResolveRecordById(id int) ResolveRecord { var record ResolveRecord _, err := Engine.Table("resolve_record").Where("`id` = ?", id).Get(&record) diff --git a/dns.sqlite3 b/dns.sqlite3 index 03d37d40bda2fcfe8867df0cbb2aac1e2638d3d4..c3cc68eb1bf9be3234244fd0f49ae17d94e196b9 100644 GIT binary patch delta 144 zcmZozz|^pSX@WGP`$QRMM)!>g^Yx{LdHGWqIQiTd_;2t{He+RFrCxqYQhudga(=EOm!YMRo}rnAo}rPko{_O3yP6PGT}4F& ex;i5hV?9GdLp?(SBX%{O$+zrPHt(@>2?PK)U?eO6 delta 60 zcmV-C0K@-)paOuP0+1U4MUfms0Y$N3pDz~?4G&}h2M(4157-Wt4~h=H4>}JJ4(78V S5P%K>CJd9>KP0ofK15Lp%@Lvi