<commit_before>from django.db import models
import datetime as dt
from etcetera.structure.models import Building
from etcetera.extras import constants

class EquipmentType(models.Model):
	"""A category for the type of equipment"""
	name = models.CharField(max_length=100)
	
	class Meta:
		ordering = ('name',)
	
	def __unicode__(self):
		return u"%s" % self.name

class Make(models.Model):
	name = models.CharField(max_length=100)
	website = models.URLField(blank=True, verify_exists=False)
	
	class Meta:
		ordering = ('name',)
	
	def __unicode__(self):
		return u"%s" % self.name

class Equipment(models.Model):
	"""One item of equipment"""
	
	barcode = models.CharField(blank=True, max_length=6)
	smsu_id = models.CharField(blank=True, max_length=8)
	equipment_type = models.ForeignKey(EquipmentType) #req
	building = models.ForeignKey(Building, null=True)
	room = models.CharField(blank=True, max_length=15)
	status = models.CharField(blank=True, max_length=15, choices=constants.EQUIPMENT_STATUSES)
	serial = models.CharField(blank=True, max_length=100)
	video_unit = models.IntegerField(blank=True, null=True, max_length=5)
	property_control = models.IntegerField(blank=True, null=True, max_length=5)
	lamp_type = models.CharField(blank=True, max_length=5)
	last_inventoried = models.DateField(default=dt.datetime.today, blank=True, null=True) #req<commit_msg>Set equipment_id to allow blank in admin. Not required (set to blank if equipment is transferred).<commit_after>from django.db import models
import datetime as dt
from etcetera.structure.models import Building
from etcetera.extras import constants

class EquipmentType(models.Model):
	"""A category for the type of equipment"""
	name = models.CharField(max_length=100)
	
	class Meta:
		ordering = ('name',)
	
	def __unicode__(self):
		return u"%s" % self.name

class Make(models.Model):
	name = models.CharField(max_length=100)
	website = models.URLField(blank=True, verify_exists=False)
	
	class Meta:
		ordering = ('name',)
	
	def __unicode__(self):
		return u"%s" % self.name

class Equipment(models.Model):
	"""One item of equipment"""
	
	barcode = models.CharField(blank=True, max_length=6)
	smsu_id = models.CharField(blank=True, max_length=8)
	equipment_type = models.ForeignKey(EquipmentType) #req
	building = models.ForeignKey(Building, null=True, blank=True)
	room = models.CharField(blank=True, max_length=15)
	status = models.CharField(blank=True, max_length=15, choices=constants.EQUIPMENT_STATUSES)
	serial = models.CharField(blank=True, max_length=100)
	video_unit = models.IntegerField(blank=True, null=True, max_length=5)
	property_control = models.IntegerField(blank=True, null=True, max_length=5)
	lamp_type = models.CharField(blank=True, max_length=5)
	last_inventoried = models.DateField(default=dt.datetime.today, blank=True, null=True) #req
{'fraction_non_alphanumeric': 0.11806291975963237, 'fraction_numerical': 0.012725344644750796, 'mean_word_length': 6.467018469656992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1957564', 'n_tokens_mistral': 987, 'n_tokens_neox': 928, 'n_words': 207}