test
This commit is contained in:
parent
00209a69ad
commit
3cc96d8bce
17
def.go
17
def.go
@ -1,9 +1,26 @@
|
||||
package main
|
||||
|
||||
type ChatWarsMessage struct {
|
||||
UserID64 int64 `json:"user_id"`
|
||||
SenderUserID64 int64 `json:"sender_user_id"`
|
||||
Date int32 `json:"date"`
|
||||
ID64 int64 `json:"id"`
|
||||
ChatID64 int64 `json:"chat_id"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
const (
|
||||
objTypeUser = 1
|
||||
objTypeGuild = 2
|
||||
objTypeMessage = 3
|
||||
|
||||
objSubTypeMessageUnprocess = 1
|
||||
objSubTypeMessageUnknown = 2
|
||||
objSubTypeMessageReport = 3
|
||||
objSubTypeMessageGReport = 4
|
||||
objSubTypeMessageQuest = 5
|
||||
objSubTypeMessageFight = 6
|
||||
objSubTypeMessageHero = 7
|
||||
objSubTypeMessageMe = 8
|
||||
objSubTypeMessageInventory = 9
|
||||
)
|
||||
|
6
sql.go
6
sql.go
@ -115,9 +115,9 @@ func initDB() {
|
||||
failOnError(err, "initDB : create table obj_msg_report")
|
||||
|
||||
_, err = db.Exec(`INSERT INTO code_obj_type (id, intl_id, name)
|
||||
VALUES (1, "user", "User")
|
||||
,(2, "guild", "Guild")
|
||||
,(3, "msg", "Message");`)
|
||||
VALUES (` + objTypeUser + `, "user", "User")
|
||||
,(` + objTypeGuild + `, "guild", "Guild")
|
||||
,(` + objTypeMessage + `, "msg", "Message");`)
|
||||
failOnError(err, "initDB : populate table code_obj_type")
|
||||
|
||||
_, err = db.Exec(`INSERT INTO code_obj_sub_type (id, intl_id, name, obj_type_id)
|
||||
|
Loading…
Reference in New Issue
Block a user