class Badge(db.Model): id = db.Column(db.Integer, primary_key=True) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) badge_type = db.Column(db.Integer, db.ForeignKey('badge_type.id'), nullable=False) printed_number = db.Column(db.String(32), unique=False, nullable=True) printed_name = db.Column(db.String(256), nullable=False) search_name = db.Column(db.String(256), nullable=False) first_name = db.Column(db.String(128), nullable=False) last_name = db.Column(db.String(128), nullable=False) legal_name = db.Column(db.String(256), nullable=False) legal_name_matches = db.Column(db.Boolean) phone = db.Column(db.String(64), nullable=True) email = db.Column(db.String(128), unique=False, nullable=False) user = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=True) uber_id = db.Column(db.String(128), unique=True, nullable=True) departments = db.relationship("Department", secondary="badge_to_department", back_populates="badges") room_night_requests = db.relationship("RoomNightRequest") room_night_assignments = db.relationship("RoomNightAssignment") room_night_approvals = db.relationship("RoomNightApproval") hotel_room_request = db.relationship("HotelRoomRequest") def __repr__(self): return '<Badge %r %r>' % (self.first_name, self.last_name)
class HotelRoomNight(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(16), nullable=False) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) restricted = db.Column(db.Boolean, nullable=False, default=False) restriction_type = db.Column(db.String(64), nullable=True) hidden = db.Column(db.Boolean, nullable=False, default=False) requests = db.relationship("RoomNightRequest") assignments = db.relationship("RoomNightAssignment") approvals = db.relationship("RoomNightApproval")
class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) password = db.Column(db.String(128), default="") active = db.Column(db.Boolean) badges = db.relationship("Badge") sessions = db.relationship("Session") grants = db.relationship("Grant") def __repr__(self): return '<User %r>' % self.username
class EmailSource(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), unique=True, nullable=False) description = db.Column(db.String(256), nullable=True) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) address = db.Column(db.String(128), nullable=False) region = db.Column(db.String(64), nullable=False) ses_access_key = db.Column(db.String(128), nullable=False) ses_secret_key = db.Column(db.String(128), nullable=False) active = db.Column(db.Boolean) emails = db.relationship("Email") receipts = db.relationship("EmailReceipt") def __repr__(self): return '<EmailSource %r>' % self.name
class Department(db.Model): id = db.Column(db.Integer, primary_key=True) uber_id = db.Column(db.String(128), unique=True, nullable=True) description = db.Column(db.String(256), nullable=True) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) name = db.Column(db.String(256)) badges = db.relationship("Badge", secondary="badge_to_department", back_populates="departments")
class HotelRoom(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), nullable=True) notes = db.Column(db.String(512), nullable=True) messages = db.Column(db.String(512), nullable=True) hotel_block = db.Column(db.Integer, db.ForeignKey('hotel_room_block.id'), nullable=False) hotel_location = db.Column(db.Integer, db.ForeignKey('hotel_location.id'), nullable=False) completed = db.Column(db.Boolean) room_night_assignments = db.relationship('RoomNightAssignment')
class Email(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), unique=True, nullable=False) description = db.Column(db.String(256), nullable=False) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) code = db.Column(db.String(4096), nullable=True) subject = db.Column(db.String(4096), nullable=False) body = db.Column(db.String(4096), nullable=False) active = db.Column(db.Boolean, nullable=False) send_once = db.Column(db.Boolean, nullable=False) source = db.Column(db.Integer, db.ForeignKey('email_source.id'), nullable=True) receipts = db.relationship("EmailReceipt") def __repr__(self): return '<Email %r>' % self.name
class HotelLocation(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(32), nullable=False) address = db.Column(db.String(128), nullable=False) event = db.Column(db.Integer, db.ForeignKey('event.id'), nullable=False) rooms = db.relationship("HotelRoom")
class HotelRoomBlock(db.Model): id = db.Column(db.Integer, primary_key=True) event = db.Column(db.Integer, db.ForeignKey('event.id')) name = db.Column(db.String(128), nullable=True) description = db.Column(db.String(256), nullable=True) rooms = db.relationship("HotelRoom")