mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples/vweb_fullstack: fix wrong db ORM-fields (#17907)
This commit is contained in:
parent
48d42287a9
commit
756e5d931e
@ -1,6 +1,6 @@
|
||||
module main
|
||||
|
||||
struct AuthRequestDto {
|
||||
username string [required]
|
||||
password string [required]
|
||||
username string [nonull]
|
||||
password string [nonull]
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ module main
|
||||
struct Product {
|
||||
id int [primary; sql: serial]
|
||||
user_id int
|
||||
name string [required; sql_type: 'TEXT']
|
||||
name string [nonull; sql_type: 'TEXT']
|
||||
created_at string [default: 'CURRENT_TIMESTAMP']
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ module main
|
||||
pub struct User {
|
||||
mut:
|
||||
id int [primary; sql: serial]
|
||||
username string [required; sql_type: 'TEXT'; unique]
|
||||
password string [required; sql_type: 'TEXT']
|
||||
username string [nonull; sql_type: 'TEXT'; unique]
|
||||
password string [nonull; sql_type: 'TEXT']
|
||||
active bool
|
||||
products []Product [fkey: 'user_id']
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user