aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Entities/UserDetailEntity.cs
blob: 1d9957f93cac8dd10abd1559c4545d77528f4a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Timeline.Entities
{
    [Table("user_details")]
    public class UserDetailEntity
    {
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        [Column("nickname"), MaxLength(26)]
        public string? Nickname { get; set; }

        [Column("user")]
        public long UserId { get; set; }

        [ForeignKey(nameof(UserId))]
        public UserEntity User { get; set; } = default!;
    }
}