feat: Added user profile and creation of profile
This commit is contained in:
		
							parent
							
								
									4a4d693d72
								
							
						
					
					
						commit
						545b31a15f
					
				
					 2 changed files with 31 additions and 1 deletions
				
			
		
							
								
								
									
										14
									
								
								models/UserProfile/user_profile.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								models/UserProfile/user_profile.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| from models import db | ||||
| 
 | ||||
| class UserProfile(db.Model): | ||||
|     __tablename__ = 'user_profile' | ||||
|      | ||||
|     id = db.Column(db.Integer, primary_key = True) | ||||
|     user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable = False) | ||||
|     first_name = db.Column(db.String(80), nullable = False) | ||||
|     last_name = db.Column(db.String(80), nullable = False) | ||||
|     bio = db.Column(db.Text, nullable = True) | ||||
|     profile_picture = db.Column(db.String(255), nullable = True) | ||||
|      | ||||
|     user = db.relationship('User', back_populates='profile') | ||||
|      | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Blake Ridgway
						Blake Ridgway