mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: v back-end example for vweb (#15141)
This commit is contained in:
committed by
GitHub
parent
1f3be99859
commit
2d7406a8cd
16
examples/vweb_orm_jwt/src/user_entities.v
Normal file
16
examples/vweb_orm_jwt/src/user_entities.v
Normal file
@@ -0,0 +1,16 @@
|
||||
module main
|
||||
|
||||
import time
|
||||
|
||||
[table: 'usersxqa']
|
||||
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)']
|
||||
active bool
|
||||
}
|
||||
Reference in New Issue
Block a user