The primary model users will interact with is now Websites, which will have a single guestbook associated with it (though this is not enforced by the database).
		
			
				
	
	
		
			32 lines
		
	
	
		
			939 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			939 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package forms
 | 
						|
 | 
						|
import "git.32bit.cafe/32bitcafe/guestbook/internal/validator"
 | 
						|
 | 
						|
type UserRegistrationForm struct {
 | 
						|
	Name                string `schema:"username"`
 | 
						|
	Email               string `schema:"email"`
 | 
						|
	Password            string `schema:"password"`
 | 
						|
	validator.Validator `schema:"-"`
 | 
						|
}
 | 
						|
 | 
						|
type UserLoginForm struct {
 | 
						|
	Email               string `schema:"email"`
 | 
						|
	Password            string `schema:"password"`
 | 
						|
	validator.Validator `schema:"-"`
 | 
						|
}
 | 
						|
 | 
						|
type CommentCreateForm struct {
 | 
						|
	AuthorName          string `schema:"authorname"`
 | 
						|
	AuthorEmail         string `schema:"authoremail"`
 | 
						|
	AuthorSite          string `schema:"authorsite"`
 | 
						|
	Content             string `schema:"content,required"`
 | 
						|
	validator.Validator `schema:"-"`
 | 
						|
}
 | 
						|
 | 
						|
type WebsiteCreateForm struct {
 | 
						|
	Name                string `schema:"sitename"`
 | 
						|
	SiteUrl             string `schema:"siteurl"`
 | 
						|
	AuthorName          string `schema:"authorname"`
 | 
						|
	validator.Validator `schema:"-"`
 | 
						|
}
 |