Przeglądaj źródła

im模型

master
huangjiajun 6 dni temu
rodzic
commit
a8d37af2da
2 zmienionych plików z 17 dodań i 1 usunięć
  1. +1
    -1
      cmd_db_im.bat
  2. +16
    -0
      src/im/model/friend.go

+ 1
- 1
cmd_db_im.bat Wyświetl plik

@@ -16,7 +16,7 @@ set DBNAME="egg-im"
set DBHOST="119.23.182.117"
set DBPORT="3306"

del "src\model\%Table%.go"
del "src\im\model\%Table%.go"

echo start reverse table %Table%



+ 16
- 0
src/im/model/friend.go Wyświetl plik

@@ -0,0 +1,16 @@
package model

import (
"time"
)

type Friend struct {
Id int64 `json:"id" xorm:"pk autoincr comment('自增主键') BIGINT(20)"`
UserId int64 `json:"user_id" xorm:"not null comment('用户id') unique(uk_user_id_friend_id) BIGINT(20)"`
FriendId int64 `json:"friend_id" xorm:"not null comment('好友id') unique(uk_user_id_friend_id) BIGINT(20)"`
Remarks string `json:"remarks" xorm:"not null comment('备注') VARCHAR(20)"`
Extra string `json:"extra" xorm:"not null comment('附加属性') VARCHAR(1024)"`
Status int `json:"status" xorm:"not null comment('状态,0:申请,1:同意') TINYINT(4)"`
CreateTime time.Time `json:"create_time" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"`
UpdateTime time.Time `json:"update_time" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') DATETIME"`
}

Ładowanie…
Anuluj
Zapisz