mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add model contraints.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
@@ -39,8 +40,10 @@ namespace Cicm.Database.Models
|
||||
Machines = new HashSet<Machine>();
|
||||
}
|
||||
|
||||
public int CompanyId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int CompanyId { get; set; }
|
||||
[Required]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<Machine> Machines { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user