Class Company
Companies table.
[Table("Companies")]
[Index("Slug", new string[] { }, IsUnique = true)]
[Index("Email", new string[] { }, IsUnique = true)]
public class Company
- Inheritance
-
Company
- Inherited Members
Properties
Address
Company address.
public required string Address { get; set; }
Property Value
BusinessIdentificationNumber
E.g. CHE-000.000.000
public string? BusinessIdentificationNumber { get; set; }
Property Value
CompanySubscriptions
public ICollection<CompanySubscription> CompanySubscriptions { get; set; }
Property Value
CountryCodeISO
3-letter ISO code of where the company is located.
[MaxLength(3)]
public string? CountryCodeISO { get; set; }
Property Value
CreationTimestampUTC
Unix-timestamp of when this Company was inserted into the DB.
public required long CreationTimestampUTC { get; set; }
Property Value
DeactivatedOnTimestampUTC
public long? DeactivatedOnTimestampUTC { get; set; }
Property Value
- long?
Company email address.
public required string Email { get; set; }
Property Value
Id
Sequential integer primary key.
[Key]
public long Id { get; set; }
Property Value
Location
[ForeignKey("LocationId")]
public Location? Location { get; set; }
Property Value
LocationId
public long? LocationId { get; set; }
Property Value
- long?
Members
public ICollection<UserCompany> Members { get; set; }
Property Value
Name
Company name (including legal form suffix).
public required string Name { get; set; }
Property Value
Phone
Company phone number.
public required string Phone { get; set; }
Property Value
Posts
public ICollection<Post> Posts { get; set; }
Property Value
ProfilePictureBytes
Profile picture, Base64-encoded.
[NotMapped]
public byte[]? ProfilePictureBytes { get; set; }
Property Value
- byte[]
ProfilePictureFileGuid
Remote file access token of the company's profile picture.
public Guid? ProfilePictureFileGuid { get; set; }
Property Value
- Guid?
Slug
Company slug.
[MaxLength(8)]
public required string Slug { get; set; }
Property Value
Users
public ICollection<User> Users { get; set; }
Property Value
WebsiteURL
The company's website URL.
public string? WebsiteURL { get; set; }
Property Value
Methods
GetActiveMembers()
public IEnumerable<UserCompany> GetActiveMembers()
Returns
GetAdmins()
public IEnumerable<UserCompany> GetAdmins()
Returns
GetInvitedMembers()
public IEnumerable<UserCompany> GetInvitedMembers()
Returns
GetPastMembers()
public IEnumerable<UserCompany> GetPastMembers()
Returns
HasJoinedMember(User)
public bool HasJoinedMember(User user)
Parameters
userUser
Returns
MemberHasRole(User, CompanyRole)
public bool MemberHasRole(User user, CompanyRole role)
Parameters
userUserroleCompanyRole