mirror of
https://github.com/vlang/v.git
synced 2025-09-16 07:52:32 +03:00
examples: refactor vweb_orm_jwt (#15389)
This commit is contained in:
parent
9c96b13f9b
commit
b45da86688
8 changed files with 31 additions and 48 deletions
|
@ -1,16 +1,13 @@
|
|||
module main
|
||||
|
||||
import time
|
||||
|
||||
[table: 'usersxqa']
|
||||
[table: 'users']
|
||||
struct User {
|
||||
mut:
|
||||
id int [primary; sql: serial]
|
||||
username string [required; sql_type: 'varchar(191)']
|
||||
password string [required; sql_type: 'longtext']
|
||||
name string [sql_type: 'varchar(191)']
|
||||
created_at time.Time [sql_type: 'datetime(3)']
|
||||
updated_at time.Time [sql_type: 'datetime(3)']
|
||||
deleted_at time.Time [sql_type: 'datetime(3)']
|
||||
id int [primary; sql: serial]
|
||||
username string [required; sql_type: 'TEXT']
|
||||
password string [required; sql_type: 'TEXT']
|
||||
created_at string [default: 'CURRENT_TIMESTAMP']
|
||||
updated_at string [default: 'CURRENT_TIMESTAMP']
|
||||
deleted_at string [default: 'CURRENT_TIMESTAMP']
|
||||
active bool
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue